X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=cd3c764511497208938ee95d12225ca8df31536a;hp=5442b8c841dcdf5bf236d8ae99f7257af291d5e5;hb=b04d499bbcaaebb4167def16ac650ed27355fef8;hpb=a3480fcdcc687f87ade087b72b5fd62de5cd9077 diff --git a/autoconfig.functions b/autoconfig.functions index 5442b8c..cd3c764 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 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 @@ -116,26 +116,27 @@ fi # {{{ 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 } } @@ -143,16 +144,16 @@ config_debug(){ # {{{ 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 } # }}}