From: Michael Prokop Date: Fri, 21 Mar 2008 23:44:44 +0000 (+0100) Subject: config_mypath(): allow setting additional $PATH X-Git-Tag: 0.8.5 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=547a62897d1f9e93ea1a344708f6f4c6e6f2f4c0 config_mypath(): allow setting additional $PATH --- diff --git a/autoconfig b/autoconfig index ef556e7..ad64265 100644 --- a/autoconfig +++ b/autoconfig @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Sep 06 23:57:14 CEST 2007 [mika] +# Latest change: Sat Mar 22 00:42:18 CET 2008 [mika] ################################################################################ ################################################################################ @@ -92,6 +92,7 @@ CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules CONFIG_MOUSE='yes' # show mouse information (expert-mode) CONFIG_MYCONFIG='yes' # check if we want the config floppy +CONFIG_MYPATH='yes' # provide setting additional paths via bootoption mypath CONFIG_NETCONFIG='yes' # download configuration archive provided by bootoption netconfig=... CONFIG_NETIPV6='yes' # check for bootparam ipv6 CONFIG_PASSWD='yes' # set password via bootparam passwd diff --git a/autoconfig.functions b/autoconfig.functions index d91089d..c75b274 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: Mon Feb 18 13:30:57 CET 2008 [mika] +# Latest change: Sat Mar 22 00:41:14 CET 2008 [mika] ################################################################################ # {{{ path, variables, signals, umask, zsh @@ -1906,6 +1906,18 @@ fi } # }}} +# {{{ mypath +config_mypath(){ +if checkbootparam "mypath" ; then + MY_PATH="$(getbootparam 'mypath' 2>>$DEBUG)" + 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 $? +fi +} +# }}} + # {{{ distcc config_distcc(){ if checkbootparam "distcc" ; then diff --git a/autoconfig.small b/autoconfig.small index 1ddc961..5b68b34 100644 --- a/autoconfig.small +++ b/autoconfig.small @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Don Sep 06 23:57:08 CEST 2007 [mika] +# Latest change: Sat Mar 22 00:42:16 CET 2008 [mika] ################################################################################ ################################################################################ @@ -92,6 +92,7 @@ CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules CONFIG_MOUSE='yes' # show mouse information (expert-mode) CONFIG_MYCONFIG='yes' # check if we want the config floppy +CONFIG_MYPATH='yes' # provide setting additional paths via bootoption mypath CONFIG_NETCONFIG='yes' # download configuration archive provided by bootoption netconfig=... CONFIG_NETIPV6='yes' # check for bootparam ipv6 CONFIG_PASSWD='yes' # set password via bootparam passwd diff --git a/debian/changelog b/debian/changelog index 95a2916..7b38239 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +grml-autoconfig (0.8.5) unstable; urgency=low + + * config_mypath(): allow setting additional $PATH via bootoption + mypath, usage example: "mypath=/forensic" + + -- Michael Prokop Sat, 22 Mar 2008 00:42:34 +0100 + grml-autoconfig (0.8.4) unstable; urgency=low * Make sure we support old directory layout (/cdrom) as diff --git a/grml-autoconfig b/grml-autoconfig index 8c79617..b6a5f91 100755 --- a/grml-autoconfig +++ b/grml-autoconfig @@ -262,6 +262,8 @@ checkvalue $CONFIG_IPW3945 && config_ipw3945 checkvalue $CONFIG_AUTOMOUNT && config_automount +checkvalue $CONFIG_MYPATH && config_mypath + checkvalue $CONFIG_DISTCC && config_distcc checkvalue $CONFIG_DISTRI && config_distri