From ed24d281631d564321d099a0d5e78be232d7de78 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 20 Aug 2019 12:56:47 -0500 Subject: update sysvinit support files --- support/sysvinit/Makefile | 2 +- support/sysvinit/halt.sh | 6 ++++++ support/sysvinit/inittab | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 support/sysvinit/halt.sh diff --git a/support/sysvinit/Makefile b/support/sysvinit/Makefile index b2071611..940c9746 100644 --- a/support/sysvinit/Makefile +++ b/support/sysvinit/Makefile @@ -2,7 +2,7 @@ MK= ../../mk include ${MK}/os.mk DIR= ${DATADIR}/support/sysvinit -INC= inittab README.md +INC= halt.sh inittab README.md include ${MK}/scripts.mk diff --git a/support/sysvinit/halt.sh b/support/sysvinit/halt.sh new file mode 100644 index 00000000..07a32b99 --- /dev/null +++ b/support/sysvinit/halt.sh @@ -0,0 +1,6 @@ +#!/bin/sh +if [ "$INIT_HALT" = HALT ]; then + exec /sbin/halt -dhn +else + exec /sbin/poweroff -dhn +fi diff --git a/support/sysvinit/inittab b/support/sysvinit/inittab index 25790970..777df210 100644 --- a/support/sysvinit/inittab +++ b/support/sysvinit/inittab @@ -10,13 +10,15 @@ si::sysinit:/sbin/openrc sysinit # Further system initialization, brings up the boot runlevel. rc::bootwait:/sbin/openrc boot +l0u:0:wait:/sbin/telinit u l0:0:wait:/sbin/openrc shutdown -l0s:0:wait:/sbin/halt -dhip +l0s:0:wait:/sbin/halt.sh l1:S1:wait:/sbin/openrc single l2:2:wait:/sbin/openrc nonetwork l3:3:wait:/sbin/openrc default l4:4:wait:/sbin/openrc default l5:5:wait:/sbin/openrc default +l6u:6:wait:/sbin/telinit u l6:6:wait:/sbin/openrc reboot l6r:6:wait:/sbin/reboot -d #z6:6:respawn:/sbin/sulogin @@ -34,8 +36,8 @@ c5:2345:respawn:/sbin/agetty 38400 tty5 linux c6:2345:respawn:/sbin/agetty 38400 tty6 linux # SERIAL CONSOLES -#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100 -#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100 +#s0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100 +#s1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100 # What to do at the "Three Finger Salute". ca:12345:ctrlaltdel:/sbin/shutdown -r now -- cgit v1.2.3