Skip to content

Commit

Permalink
Drop config_debug, not working under systemd as intended
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mika committed May 19, 2017
1 parent 626a0f8 commit f9648a3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 63 deletions.
1 change: 0 additions & 1 deletion autoconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 0 additions & 31 deletions autoconfig.functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
31 changes: 0 additions & 31 deletions grml-autoconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
# }}}
Expand Down

0 comments on commit f9648a3

Please sign in to comment.