Warning!

Notice: the grml team is migrating from Mercurial to Git.
Please visit git.grml.org instead!

Source /etc/grml/grml-live.local before parsing command line options
authorMichael Prokop <mika@grml.org>
Fri Jan 11 10:23:13 2008 +0100 (10 months ago)
changeset 464d026040ece92
manifestd026040ece92
parent 452b076d50923f7
child 465da92bf8caf93
Source /etc/grml/grml-live.local before parsing command line options
debian/changelog
grml-live
--- a/debian/changelog Fri Jan 11 09:18:41 2008 +0100
+++ b/debian/changelog Fri Jan 11 10:23:13 2008 +0100
@@ -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
--- a/grml-live Fri Jan 11 09:18:41 2008 +0100
+++ b/grml-live Fri Jan 11 10:23:13 2008 +0100
@@ -4,7 +4,7 @@
# Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
# 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 {{{
@@ -175,6 +175,17 @@ http://grml.org/bugs/
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 {{{
@@ -214,22 +225,13 @@ specify it on the command line using the
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 {{{