diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index f6fbfd72c3..c1dd1036d4 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -76,6 +76,9 @@ disk=*) disk="${arg#*=}" ;; + textmode) + INIT_ARGS="$INIT_ARGS --unit=textmode.target" + ;; installer) INIT_ARGS="$INIT_ARGS --unit=installer.target" ;; diff --git a/packages/sysutils/busybox/init.d/99_shell b/packages/sysutils/busybox/init.d/99_shell deleted file mode 100644 index 21e3aed810..0000000000 --- a/packages/sysutils/busybox/init.d/99_shell +++ /dev/null @@ -1,29 +0,0 @@ -################################################################################ -# This file is part of OpenELEC - http://www.openelec.tv -# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) -# -# This Program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with OpenELEC.tv; see the file COPYING. If not, write to -# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. -# http://www.gnu.org/copyleft/gpl.html -################################################################################ -# start text mode shell -# -# runlevels: textmode - -TTY="1" - -while true; do - PS1="\007\]\[\e[1;32m\]\h\[\e[1;32m\]:\[\e[1;34m\]\w \[\e[0m\]\\$ " - openvt -w -c $TTY /bin/sh -done diff --git a/packages/sysutils/busybox/install b/packages/sysutils/busybox/install index cf34975385..7639bad8b2 100755 --- a/packages/sysutils/busybox/install +++ b/packages/sysutils/busybox/install @@ -90,6 +90,7 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`" fi enable_service debug-shell.service + enable_service shell.service enable_service show-version.service enable_service var.mount enable_service var-log-debug.service diff --git a/packages/sysutils/busybox/system.d/shell.service b/packages/sysutils/busybox/system.d/shell.service new file mode 100644 index 0000000000..8b6d98bdf5 --- /dev/null +++ b/packages/sysutils/busybox/system.d/shell.service @@ -0,0 +1,22 @@ +[Unit] +Description=Textmode Shell +After=multi-user.target + +[Service] +Environment=TTY=1 +WorkingDirectory=/storage +ExecStart=/bin/sh -c 'clear; lsb_release; . /etc/profile; exec /bin/sh' + +Restart=always +RestartSec=0 +StandardInput=tty +TTYPath=/dev/tty1 +TTYReset=yes +TTYVHangup=yes +KillMode=process +IgnoreSIGPIPE=no +# bash ignores SIGTERM +KillSignal=SIGHUP + +[Install] +WantedBy=textmode.target diff --git a/packages/sysutils/busybox/system.d/textmode.target b/packages/sysutils/busybox/system.d/textmode.target new file mode 100644 index 0000000000..8237b9c711 --- /dev/null +++ b/packages/sysutils/busybox/system.d/textmode.target @@ -0,0 +1,9 @@ +[Unit] +Description=Textmode +Requires=multi-user.target +After=multi-user.target +Conflicts=rescue.target +AllowIsolate=yes + +[Install] +Alias=default.target