# Authors: grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
# Bug-Reports: see http://grml.org/bugs/
# License: This file is licensed under the GPL v2.
-# Latest change: Mon Jän 14 21:34:16 CET 2008 [mika]
+# Latest change: Son Jän 20 19:51:41 CET 2008 [mika]
################################################################################
# {{{ path, variables, signals, umask, zsh
# {{{ debug
config_debug(){
- if checkbootparam "debug"; then
- BOOTDEBUG="yes"
- fi
- if stringinstring "BOOT_IMAGE=debug " "$CMDLINE" ; then
- BOOTDEBUG="yes"
- fi
+ checkbootparam "debug" && BOOTDEBUG="yes"
+ stringinstring "BOOT_IMAGE=debug " "$CMDLINE" && BOOTDEBUG="yes"
+
rundebugshell(){
if [ -n "$BOOTDEBUG" ]; then
- einfo "Starting intermediate shell stage $stage as requested by \"debug\" option."
- eindent
- if [ -r /etc/grml/screenrc ] ; then
- einfo "Starting GNU screen to be able to use a full featured shell environment."
- einfo "Just exit the shells (and therefore screen) to continue boot process..."
- /bin/zsh -c "screen -c /etc/grml/screenrc"
- else
- einfo "Notice that the shell does not provide job handling: ctrl-z, bg and fg won't work!"
- einfo "Just exit the shell to continue boot process..."
- /bin/zsh
- fi
- eoutdent
+ einfo "Starting intermediate shell stage $stage as requested by \"debug\" option."
+ if [ grep -q "debug=noscreen" "$CMDLINE" ] ; then
+ /bin/zsh
+ else
+ eindent
+ if [ -r /etc/grml/screenrc ] ; then
+ einfo "Starting GNU screen to be able to use a full featured shell environment."
+ einfo "Just exit the shells (and therefore screen) to continue boot process..."
+ /bin/zsh -c "screen -c /etc/grml/screenrc"
+ else
+ einfo "Notice that the shell does not provide job handling: ctrl-z, bg and fg won't work!"
+ einfo "Just exit the shell to continue boot process..."
+ /bin/zsh
+ fi
+ eoutdent
+ fi
fi
}
}
# {{{ log
config_log(){
-if checkbootparam "log"; then
- export DEBUG="/tmp/grml.log.`date +%Y%m%d`"
- touch $DEBUG
- einfo "Bootparameter log found. Log files: ${DEBUG} and /var/log/boot."
- eindent
- einfo "Starting bootlogd."
- bootlogd -r -c 1>>$DEBUG 2>&1 ; eend $?
- eoutdent
+if checkbootparam "log" || checkbootparam "debug" ; then
+ export DEBUG="/tmp/grml.log.`date +%Y%m%d`"
+ touch $DEBUG
+ einfo "Bootparameter log found. Log files: ${DEBUG} and /var/log/boot"
+ eindent
+ einfo "Starting bootlogd." # known to be *very* unreliable :(
+ bootlogd -r -c 1>>$DEBUG 2>&1 ; eend $?
+ eoutdent
else
- DEBUG="/dev/null"
+ DEBUG="/dev/null"
fi
}
# }}}
+grml-autoconfig (0.8.3) unstable; urgency=low
+
+ * config_log(): log as well if bootoption debug is present
+ * config_debug(): support bootoption debug=noscreen to be able to
+ run a non-screen session
+
+ -- Michael Prokop <mika@grml.org> Sun, 20 Jan 2008 19:52:14 +0100
+
grml-autoconfig (0.8.2) unstable; urgency=low
* grml-autoconfig scripts: if an "auto" configured device can be found in
# 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.
-# Latest change: Sam Nov 03 17:22:09 CET 2007 [mika]
+# Latest change: Son Jän 20 19:44:11 CET 2008 [mika]
################################################################################
# http://wiki.debian.org/LSBInitScripts =>
fi
if [ -z "$SPLASH" ] ; then
- stage=5
- rundebugshell
+ stage=5
+ rundebugshell
fi
if [ -z "$BOOTDEBUG" ] ; then
- einfo "Setting kernel ring buffer to level 2."
- echo "2" > /proc/sys/kernel/printk ; eend $?
+ einfo "Setting kernel ring buffer to level 2."
+ echo "2" > /proc/sys/kernel/printk ; eend $?
else
- einfo "Setting kernel ring buffer to level 6. Adjust manually via running dmesg -n \$VALUE."
- echo "6" > /proc/sys/kernel/printk ; eend $?
+ einfo "Setting kernel ring buffer to level 6. Adjust manually via running dmesg -n \$VALUE."
+ echo "6" > /proc/sys/kernel/printk ; eend $?
fi
checkvalue $CONFIG_SYSLOG && config_syslog
# {{{ debug
if [ -z "$SPLASH" ] ; then
- stage=6
- rundebugshell
+ stage=6
+ rundebugshell
fi
if [ -n "$BOOTDEBUG" ] ; then
- CMDLINE="$(cat /proc/cmdline)"
- [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/*)"
- einfo "Bootoption debug detected. Printing kernel command line:"
- echo "$CMDLINE"
+ CMDLINE="$(cat /proc/cmdline)"
+ [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/*)"
+ einfo "Bootoption debug detected. Printing kernel command line:"
+ echo "$CMDLINE"
fi
# }}}