From afddea760edd223f2413afa64e67c087d7a25468 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 16 Aug 2013 12:22:06 +0200 Subject: [PATCH] busybox: rework debug shell systemd service scripts Signed-off-by: Stephan Raue --- .../sysutils/busybox/profile.d/02-shell.conf | 2 +- .../busybox/system.d/debug-shell.service | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/sysutils/busybox/profile.d/02-shell.conf b/packages/sysutils/busybox/profile.d/02-shell.conf index 49472f63d0..2bab1c6eab 100644 --- a/packages/sysutils/busybox/profile.d/02-shell.conf +++ b/packages/sysutils/busybox/profile.d/02-shell.conf @@ -23,7 +23,7 @@ # evironment variables that are not user defined. ################################################################################ -PS1="\[\033]0;\h: \w\007\]\[\e[1;32m\]\h\[\e[1;32m\]:\[\e[1;34m\]\w \[\e[0m\]\\$ " +PS1="\[\e[1;32m\]\h\[\e[1;32m\]:\[\e[1;34m\]\w \[\e[0m\]\\$ " export PS1 case "$TERM" in diff --git a/packages/sysutils/busybox/system.d/debug-shell.service b/packages/sysutils/busybox/system.d/debug-shell.service index ad4890ede1..8d3484400b 100644 --- a/packages/sysutils/busybox/system.d/debug-shell.service +++ b/packages/sysutils/busybox/system.d/debug-shell.service @@ -1,19 +1,24 @@ [Unit] Description=Debug Shell +DefaultDependencies=false + ConditionKernelCommandLine=debugging [Service] -Environment=HOME=/storage TERM=linux +Environment=TTY=3 WorkingDirectory=/storage -ExecStart=/sbin/getty -n 38400 tty3 +ExecStart=/bin/sh -c '. /etc/profile; exec /bin/sh' + Restart=always RestartSec=0 -TimeoutSec=0 +StandardInput=tty +TTYPath=/dev/tty3 +TTYReset=yes +TTYVHangup=yes KillMode=process - -# Some login implementations ignore SIGTERM, so we send SIGHUP -# instead, to ensure that login terminates cleanly. +IgnoreSIGPIPE=no +# bash ignores SIGTERM KillSignal=SIGHUP [Install] -WantedBy=multi-user.target +WantedBy=basic.target