CONFIG_DEBOOTSTRAP='yes' # support automatic installation of Debian via grml-deboostrap
CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards
CONFIG_DEBS='yes' # check for bootoption debs for installing .debs
-CONFIG_DEBUG='yes' # activate start of shells during startup at several stages
CONFIG_DISPLAY_SSH_FINGERPRINTS='yes' # display SSH server key fingerprints
CONFIG_DISTRI='yes' # support some customization via bootoption distri
CONFIG_DMRAID='yes' # support for dmraid
fi
# }}}
-# {{{ debug
-config_debug(){
- checkbootparam 'debug' && BOOTDEBUG="yes"
- checkbootparam "BOOT_IMAGE=debug" && BOOTDEBUG="yes"
-
- rundebugshell(){
- if [ -n "$BOOTDEBUG" ]; then
- einfo "Starting intermediate shell stage $stage as requested by \"debug\" option."
- if [ grep -q "debug=noscreen" "$CMDLINE" ] ; then
- 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
- 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' || checkbootparam 'debug' ; then
if checkbootparam 'distri'; then
DISTRI="$(getbootparam 'distri' 2>>$DEBUG)"
if [ -r "${LIVECD_PATH}"/desktop/"$DISTRI".jpg ] ; then
- [ -n "$BOOTDEBUG" ] && einfo "Debug: bootoption distri found and file ${LIVECD_PATH}/desktop/${DISTRI} present" && eend 0
# make sure the desktop.jpg file is not a symlink, so copying does not file then
[ -L /usr/share/grml/desktop.jpg ] && rm /usr/share/grml/desktop.jpg
cp "${LIVECD_PATH}"/desktop/"$DISTRI".jpg /usr/share/grml/desktop.jpg
# }}}
# {{{ main grml-autoconfig
-checkvalue $CONFIG_DEBUG && config_debug
-
# make sure symlink /etc/mtab exists, this is usually handled by
# /etc/init.d/checkroot.sh but we don't execute this script on the live system
if [ -z "$INSTALLED" ] ; then
ln -sf /proc/mounts /etc/mtab
fi
-stage=5
-rundebugshell
-
-if [ -z "$BOOTDEBUG" ] ; then
- 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 $?
-fi
-
checkvalue $CONFIG_SYSLOG && config_syslog
if checkbootparam 'forensic' ; then
checkvalue $CONFIG_LVM && config_lvm
-# No kernel messages while probing modules
-echo "0" > /proc/sys/kernel/printk
-
checkvalue $CONFIG_TESTCD && config_testcd
checkvalue $CONFIG_BRLTTY && config_brltty
checkvalue $CONFIG_XSTARTUP && config_x_startup
# }}}
-# {{{ debug
-stage=6
-rundebugshell
-
-if [ -n "$BOOTDEBUG" ] ; then
- # set only if not already set
- if [ -z "$CMDLINE" ] ; then
- CMDLINE="$(cat /proc/cmdline)"
- [ -d ${LIVECD_PATH}/bootparams/ ] && CMDLINE="$CMDLINE $(cat ${LIVECD_PATH}/bootparams/*)"
- fi
- einfo "Bootoption debug detected. Printing kernel command line:"
- echo "$CMDLINE"
-fi
-# }}}
-
# {{{ Re-enable signals
trap 2 3 11
# }}}