From ac53b25f167746cff0885ee28c6a172a43b81984 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 8 Jan 2013 18:31:46 +0100 Subject: [PATCH] Remove handling of "debug2" and "S|s|single" kernel command line options The "S|s|single" option is handled by systemd (starting rescue.target). And the rescue target basically removes the need for a special debug shell. (Also, there is "systemd.crash_shell=1" for starting a shell if systemd crashes.) --- modules/system/boot/stage-2-init.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index 67a4e0ed16d..0ad9982e430 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -62,20 +62,12 @@ ln -s /proc/mounts /etc/mtab # Process the kernel command line. -debug2= for o in $(cat /proc/cmdline); do case $o in debugtrace) # Show each command. set -x ;; - debug2) - debug2=1 - ;; - S|s|single) - # !!! argh, can't pass a startup event to Upstart yet. - exec @shell@ - ;; resume=*) set -- $(IFS==; echo $o) resumeDevice=$2 @@ -168,26 +160,6 @@ ln -sfn /run/booted-system /nix/var/nix/gcroots/booted-system @shell@ @postBootCommands@ -# For debugging Upstart. -if [ -n "$debug2" ]; then - # Get the console from the kernel cmdline - console=tty1 - for o in $(cat /proc/cmdline); do - case $o in - console=*) - set -- $(IFS==; echo $o) - params=$2 - set -- $(IFS=,; echo $params) - console=$1 - ;; - esac - done - - echo "Debug shell called from @out@" - setsid @shellDebug@ < /dev/$console >/dev/$console 2>/dev/$console -fi - - # Start systemd. echo "starting systemd..." PATH=/run/current-system/systemd/lib/systemd \