mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 05:06:43 +00:00
busybox: port textmode runlevel and textmode shell to systemd
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
51c746262e
commit
c0e0dc88a0
@ -76,6 +76,9 @@
|
|||||||
disk=*)
|
disk=*)
|
||||||
disk="${arg#*=}"
|
disk="${arg#*=}"
|
||||||
;;
|
;;
|
||||||
|
textmode)
|
||||||
|
INIT_ARGS="$INIT_ARGS --unit=textmode.target"
|
||||||
|
;;
|
||||||
installer)
|
installer)
|
||||||
INIT_ARGS="$INIT_ARGS --unit=installer.target"
|
INIT_ARGS="$INIT_ARGS --unit=installer.target"
|
||||||
;;
|
;;
|
||||||
|
@ -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
|
|
@ -90,6 +90,7 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
enable_service debug-shell.service
|
enable_service debug-shell.service
|
||||||
|
enable_service shell.service
|
||||||
enable_service show-version.service
|
enable_service show-version.service
|
||||||
enable_service var.mount
|
enable_service var.mount
|
||||||
enable_service var-log-debug.service
|
enable_service var-log-debug.service
|
||||||
|
22
packages/sysutils/busybox/system.d/shell.service
Normal file
22
packages/sysutils/busybox/system.d/shell.service
Normal file
@ -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
|
9
packages/sysutils/busybox/system.d/textmode.target
Normal file
9
packages/sysutils/busybox/system.d/textmode.target
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Textmode
|
||||||
|
Requires=multi-user.target
|
||||||
|
After=multi-user.target
|
||||||
|
Conflicts=rescue.target
|
||||||
|
AllowIsolate=yes
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
Alias=default.target
|
Loading…
x
Reference in New Issue
Block a user