config_mypath(): create directory if it does not exist yet 0.8.6
authorMichael Prokop <mika@grml.org>
Sat, 17 May 2008 20:16:39 +0000 (22:16 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 17 May 2008 20:16:39 +0000 (22:16 +0200)
autoconfig.functions
debian/changelog

index c5f23e7..48d98da 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Mai 17 22:04:08 CEST 2008 [mika]
+# Latest change: Sam Mai 17 22:15:54 CEST 2008 [mika]
 ################################################################################
 
 # {{{ path, variables, signals, umask, zsh
@@ -1924,6 +1924,15 @@ if checkbootparam "mypath" ; then
    einfo "Bootparameter mypath found, adding ${MY_PATH} to /etc/grml/my_path"
    touch /etc/grml/my_path
    chmod 644 /etc/grml/my_path
+   # make sure the directories exist:
+   eindent
+   for i in $(echo $MY_PATH | sed 's/:/\n/g') ; do
+       if ! [ -d "$i" ] ; then
+          einfo "Creating directory $i"
+          mkdir -d "$i" ; eend $?
+       fi
+   done
+   eoutdent
    echo "$MY_PATH" >> /etc/grml/my_path ; eend $?
 fi
 }
index cfb13bf..5c253e5 100644 (file)
@@ -1,6 +1,7 @@
 grml-autoconfig (0.8.6) unstable; urgency=low
 
   * config_syslog(): support other syslog daemons than syslog-ng as well.
+  * config_mypath(): create directory if it does not exist yet.
 
  -- Michael Prokop <mika@grml.org>  Sat, 17 May 2008 22:06:05 +0200