From: Michael Prokop Date: Fri, 11 Jan 2008 09:23:13 +0000 (+0100) Subject: Source /etc/grml/grml-live.local before parsing command line options X-Git-Tag: 0.2~4^2~1 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=cbf0aba379c928816b0e8ff7b24b6e9a233ab307 Source /etc/grml/grml-live.local before parsing command line options --- diff --git a/debian/changelog b/debian/changelog index f2eca27..ec3192e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ grml-live (0.1) unstable; urgency=low * Bump version number to 0.1 as we ship grml-live with the upcoming stable versions. + * Source /etc/grml/grml-live.local before parsing command line + options to be able to override configuration on the commandline. * Use /usr/bin/vim.tiny as alternativ for vi. * Add new packages to GRML_FULL: - at76-usb-modules-2.6.23-grml64 diff --git a/grml-live b/grml-live index ab0b1c1..664c145 100755 --- a/grml-live +++ b/grml-live @@ -4,7 +4,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 or any later version. -# Latest change: Fre Jän 11 09:09:02 CET 2008 [mika] +# Latest change: Fre Jän 11 10:22:19 CET 2008 [mika] ################################################################################ # read configuration files, set some misc variables {{{ @@ -177,6 +177,17 @@ http://grml.org/bugs/ } # }}} +# read local (non-packaged) configuration {{{ +LOCAL_CONFIG=/etc/grml/grml-live.local +if [ -r "$LOCAL_CONFIG" ] ; then + log "Sourcing $LOCAL_CONFIG" + . $LOCAL_CONFIG +else + log "No $LOCAL_CONFIG found, not sourcing it" + LOCAL_CONFIG='' +fi +# }}} + # command line parsing {{{ while getopts "a:C:c:g:i:o:r:s:t:v:bFhuVz" opt; do @@ -214,22 +225,13 @@ specify it on the command line using the -c option." specify it on the command line using the -o option." # }}} -# read local (non-packaged) configuration {{{ -LOCAL_CONFIG=/etc/grml/grml-live.local -if [ -r "$LOCAL_CONFIG" ] ; then - log "Sourcing $LOCAL_CONFIG" - . $LOCAL_CONFIG -else - log "No $LOCAL_CONFIG found, not sourcing it" - LOCAL_CONFIG='' -fi - -# clean/zero grml-live logfile: +# clean/zero grml-live logfile {{{ if [ -n "$ZERO_LOGFILE" ] ; then echo -n > $LOGFILE fi +# }}} -# clean/zero/remove old FAI directory: +# clean/zero/remove old FAI directory {{{ if [ -n "$ZERO_FAI_LOGFILE" ] ; then if [ -d /var/log/fai/"$HOSTNAME" ] ; then rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink /var/log/fai/"$HOSTNAME"/last)" @@ -240,7 +242,6 @@ if [ -n "$ZERO_FAI_LOGFILE" ] ; then /var/log/fai/"$HOSTNAME"/last-softupdate fi fi - # }}} # ask user whether the setup is ok {{{