* Log the executed FAI command line to /var/log/grml-live.log.
* No longer update chroot system via instsoft.GRMLBASE as FAI
should do that now.
+ * New option '-C <configuration_file>' for specifying a configuration
+ file. Needs heavy testing though, because the files are updated
+ during runtime it isn't as easy as expected to be. :-/
* Do not enable apt-listbugs if the binary is not available.
[Testing: issue340]
* Add keychain package to GRML_MEDIUM.
*******************************************************************************
Important! This document is growing as requested. If you have questions which
aren't answered by this document yet please let me know: <mika@grml.org>!
-This document currently applies to grml-live version 0.0.6.
+This document currently applies to grml-live version 0.0.10.
*******************************************************************************
Description
/etc/grml/fai/config/package_config/ for a full list). So instead of GRML_SMALL
you can also use GRML_MEDIUM and GRML_FULL instead.
+ -C **CONFIGURATION_FILE**::
+
+The specified file is used as configuration file for grml-live. By default
+/etc/grml/grml-live.conf is used for main configuration. If a file named
+/etc/grml/grml-live.local exists it is used as well (sourced after reading
+/etc/grml/grml-live.conf to allow overriding settings). As a last option the
+specified configuration file is sourced so it is possible to override settings
+of /etc/grml/grml-live.conf as well as of /etc/grml/grml-live.local. Please
+notice that all configuration files have to be adjusted during execution of
+grml-live, so please make sure you use /etc/grml/grml-live.conf as a base for
+your own configuration file. Please also notice that the configuration file
+specified via this option is **not** (yet) supported inside the
+scripts/hooks/classes at /etc/grml/fai/config. Instead use
+/etc/grml/grml-live.conf and/or /etc/grml/grml-live.local for configuration
+stuff used inside /etc/grml/fai/config.
+
-F::
Force execution and do not prompt for acknowledgment of configuration.
-t **TEMPLATE_DIRECTORY**::
-Specify place of the templates used for building the ISO. By default
+Specify place of the templates used for building the ISO. By default
(and if not manually specified) this is /usr/share/grml-live/templates/.
-u::
Help, I'm using Debian etch and I don't have FAI version >3.2
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.3_all.deb \
+ wget http://www.informatik.uni-koeln.de/fai/download/etch/fai-client_3.2.3_all.deb \
http://www.informatik.uni-koeln.de/fai/download/etch/fai-server_3.2.3_all.deb \
http://www.informatik.uni-koeln.de/fai/download/etch/fai-doc_3.2.3_all.deb
dpkg -i fai-client_3.2.3_all.deb fai-server_3.2.3_all.deb fai-doc_3.2.3_all.deb
# 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: Mon Nov 12 11:14:32 CET 2007 [mika]
+# Latest change: Sun Nov 25 18:28:54 CET 2007 [mika]
################################################################################
set -u
echo grml_chroot > $target/etc/debian_chroot
HOSTNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
echo "$HOSTNAME" > $target/etc/hostname
set -e
HOSTNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
echo "$HOSTNAME" > $target/etc/hostname
set -e
USERNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$USERNAME" ] || USERNAME=grml
if [ -r /etc/grml/fai/files/etc/sudoers ] ; then
set -e
USERNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$USERNAME" ] || USERNAME=grml
if grep -q "$USERNAME:x:1000" $target/etc/group ; then
set -e
USERNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$USERNAME" ] || USERNAME=grml
if [ -r /etc/grml/fai/files/etc/fstab ] ; then
set -e
HOSTNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
if [ -r /etc/grml/fai/files/etc/hosts ] ; then
################################################################################
HOSTNAME=''
-[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+[ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
if ! [ -d /var/log/fai/"$HOSTNAME"/last/ ] ; then
if ifclass RELEASE ; then
HOSTNAME=''
- [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+ [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
+ [ -r /etc/grml/grml-live.local ] && . /etc/grml/grml-live.local
[ -n "$HOSTNAME" ] || HOSTNAME=grml
if [ -r /etc/resolv.conf ] ; then
# 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: Sun Nov 25 17:16:07 CET 2007 [mika]
+# Latest change: Sun Nov 25 18:29:07 CET 2007 [mika]
################################################################################
# read configuration files, set some misc variables {{{
echo -n > $LOGFILE
fi
+if [ -n "$ZERO_FAI_LOGFILE" ] ; then
+ if [ -d /var/log/fai/"$HOSTNAME" ] ; then
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last)"
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last-softupdate)"
+ rm -rf /var/log/fai/"$HOSTNAME"/"$(readlink last-dirinstall)"
+ fi
+fi
+
NFSROOT_CONF=/etc/grml/fai/make-fai-nfsroot.conf
# }}}
# command line parsing {{{
-while getopts "a:c:g:i:o:r:s:t:v:FhuV" opt; do
+while getopts "a:C:c:g:i:o:r:s:t:v:FhuV" opt; do
case "$opt" in
a) ARCH="$OPTARG" ;;
c) CLASSES="$OPTARG" ;;
+ C) CONFIG="$OPTARG" ;;
g) GRML_NAME="$OPTARG" ;;
i) ISO_NAME="$OPTARG" ;;
o) OUTPUT="$OPTARG"
echo
echo " FAI classes: $CLASSES"
echo " main directory: $OUTPUT"
+ [ -n "$CONFIG" ] && echo " configuration: $CONFIG"
[ -n "$CHROOT_OUTPUT" ] && echo " chroot target: $CHROOT_OUTPUT"
[ -n "$BUILD_OUTPUT" ] && echo " build target: $BUILD_OUTPUT"
[ -n "$ISO_OUTPUT" ] && echo " ISO target: $ISO_OUTPUT"
echo
fi
+# read local (non-packaged) configuration:
+LOCAL_CONFIG=/etc/grml/grml-live.local
+if [ -r "$LOCAL_CONFIG" ] ; then
+ log "Sourcing $LOCAL_CONFIG"
+ . $LOCAL_CONFIG
+else
+ LOCAL_CONFIG=''
+fi
+
+if [ -n "$CONFIG" ] ; then
+ if ! [ -f "$CONFIG" ] ; then
+ log "Sorry, $CONFIG could not be read. Exiting. [$(date)]"
+ eerror "Sorry, $CONFIG could not be read. Exiting."
+ bailout 1
+ else
+ log "Sourcing $CONFIG"
+ . $CONFIG
+ fi
+fi
+
start_seconds=$(cut -d . -f 1 /proc/uptime)
log "------------------------------------------------------------------------------"
log "Starting grml-live [${GRML_LIVE_VERSION}] run on $(date)"
# does this suck? YES!
if [ -n "$SUITE" ] ; then
- sed -i "s/SUITE=.*/SUITE=\"$SUITE\"/" $LIVE_CONF
- DIST="\|\ etch\ \|\ stable\ \|\ lenny\ \|\ testing\ \|\ sid\ \|\ unstable\ "
- sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $LIVE_CONF
+ for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do
+ if [ -n "$file" ] ; then
+ sed -i "s/SUITE=.*/SUITE=\"$SUITE\"/" $LIVE_CONF
+ DIST="\|\ etch\ \|\ stable\ \|\ lenny\ \|\ testing\ \|\ sid\ \|\ unstable\ "
+ sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $file
+ fi
+ done
+
sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list
# notice: activate grml-live pool only if we are building against unstable:
if grep -qe unstable -qe sid /etc/grml/fai/apt/sources.list ; then
sed -i 's/.*grml-live.*/# removed grml-live repository/' /etc/grml/fai/apt/sources.list
fi
- sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $LIVE_CONF
+ for file in "$LIVE_CONF" "$CONFIG" "$LOCAL_CONFIG" ; do
+ if [ -n "$file" ] ; then
+ sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" "$file"
+ fi
+ done
sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $NFSROOT_CONF
fi