From f9648a366334e91a4724b861913e6fa17521db4f Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 19 May 2017 15:22:20 +0200 Subject: [PATCH] Drop config_debug, not working under systemd as intended Startup of shells during bootup under systemd doesn't work as with file-rc and actually causes ugly error messages. systemd has its own mechanism and we should rely on that. With this change also drop the /proc/sys/kernel/printk related code, this *shouldn't* be relevant anymore. Closes grml/grml#3 --- autoconfig | 1 - autoconfig.functions | 31 ------------------------------- grml-autoconfig | 31 ------------------------------- 3 files changed, 63 deletions(-) diff --git a/autoconfig b/autoconfig index 345f637..88aa2ae 100644 --- a/autoconfig +++ b/autoconfig @@ -55,7 +55,6 @@ CONFIG_BRLTTY='yes' # automatically start brltty if a brltty option is 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 diff --git a/autoconfig.functions b/autoconfig.functions index 8a534e2..957fcab 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -201,36 +201,6 @@ else 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 @@ -1986,7 +1956,6 @@ config_distri(){ 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 diff --git a/grml-autoconfig b/grml-autoconfig index 08c5edd..a0d4a4c 100755 --- a/grml-autoconfig +++ b/grml-autoconfig @@ -54,25 +54,12 @@ mount_sys # }}} # {{{ 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 @@ -100,9 +87,6 @@ checkvalue $CONFIG_DMRAID && config_dmraid 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 @@ -162,21 +146,6 @@ checkvalue $CONFIG_DEBOOTSTRAP && config_debootstrap 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 # }}} -- 2.1.4