X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=ccca4214ee92601e13a07667f9e5635afc7402ac;hp=c5f23e720d6fb6c6acff633437bc500f6ad9cda9;hb=8001910c7d648cf70813e12ac50f6d47bd91d092;hpb=103ba15615e67b8b391c3239c3b7363470728265 diff --git a/autoconfig.functions b/autoconfig.functions index c5f23e7..ccca421 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # 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: Tue May 20 01:09:30 CEST 2008 [mika] ################################################################################ # {{{ path, variables, signals, umask, zsh @@ -1924,7 +1924,16 @@ 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 - echo "$MY_PATH" >> /etc/grml/my_path ; eend $? + # 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 -p "$i" ; eend $? + fi + done + grep -q "${MY_PATH}" /etc/grml/my_path || echo "${MY_PATH}" >> /etc/grml/my_path ; eend $? + eoutdent fi } # }}}