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.)
This commit is contained in:
parent
f4a3bdd6af
commit
ac53b25f16
|
@ -62,20 +62,12 @@ ln -s /proc/mounts /etc/mtab
|
||||||
|
|
||||||
|
|
||||||
# Process the kernel command line.
|
# Process the kernel command line.
|
||||||
debug2=
|
|
||||||
for o in $(cat /proc/cmdline); do
|
for o in $(cat /proc/cmdline); do
|
||||||
case $o in
|
case $o in
|
||||||
debugtrace)
|
debugtrace)
|
||||||
# Show each command.
|
# Show each command.
|
||||||
set -x
|
set -x
|
||||||
;;
|
;;
|
||||||
debug2)
|
|
||||||
debug2=1
|
|
||||||
;;
|
|
||||||
S|s|single)
|
|
||||||
# !!! argh, can't pass a startup event to Upstart yet.
|
|
||||||
exec @shell@
|
|
||||||
;;
|
|
||||||
resume=*)
|
resume=*)
|
||||||
set -- $(IFS==; echo $o)
|
set -- $(IFS==; echo $o)
|
||||||
resumeDevice=$2
|
resumeDevice=$2
|
||||||
|
@ -168,26 +160,6 @@ ln -sfn /run/booted-system /nix/var/nix/gcroots/booted-system
|
||||||
@shell@ @postBootCommands@
|
@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.
|
# Start systemd.
|
||||||
echo "starting systemd..."
|
echo "starting systemd..."
|
||||||
PATH=/run/current-system/systemd/lib/systemd \
|
PATH=/run/current-system/systemd/lib/systemd \
|
||||||
|
|
Loading…
Reference in New Issue