Making the stage2 'debug2' spawn a shell with job control, like in stage1, running it in a
virtual terminal and not in the console. This brings wonderful things like ^C. svn path=/nixos/trunk/; revision=33001
This commit is contained in:
parent
bbebba68f7
commit
331b1f46d3
|
@ -170,8 +170,19 @@ export MODULE_DIR=@kernel@/lib/modules/
|
|||
|
||||
# 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)
|
||||
console=$2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Debug shell called from @out@"
|
||||
@shell@
|
||||
setsid @shell@ < /dev/$console >/dev/$console 2>/dev/console
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue