New semantics for S/K files in boot scripts

Now start and reboot should be called as "script start", and they
should be the last in their runlevel. Note that install_initd
needs to be patched for this to work; see
https://github.com/lfs-book/LSB-Tools/pull/12
This commit is contained in:
Pierre Labastie 2022-03-22 14:29:15 +01:00
parent 3b20f597b2
commit 2539253399
2 changed files with 15 additions and 7 deletions

View File

@ -7,14 +7,18 @@
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# DJ Lucas - dj@linuxfromscratch.org
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
# : Pierre Labastie - pierre@linuxfromscratch.org
#
# Version : LFS 7.0
#
# Notes : Update March 24th, 2022: change "stop" to "start".
# Add the $last facility to Required-start
#
########################################################################
### BEGIN INIT INFO
# Provides: halt
# Required-Start:
# Required-Start: $last
# Should-Start:
# Required-Stop:
# Should-Stop:
@ -26,12 +30,12 @@
### END INIT INFO
case "${1}" in
stop)
start)
halt -d -f -i -p
;;
*)
echo "Usage: {stop}"
echo "Usage: {start}"
exit 1
;;
esac

View File

@ -6,15 +6,19 @@
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
# DJ Lucas - dj@linuxfromscratch.org
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
# Updates : Bruce Dubbs - bdubbs@linuxfromscratch.org
# : Pierre Labastie - pierre@linuxfromscratch.org
#
# Version : LFS 7.0
#
# Notes : Update March 24th, 2022: change "stop" to "start".
# Add the $last facility to Required-start
#
########################################################################
### BEGIN INIT INFO
# Provides: reboot
# Required-Start:
# Required-Start: $last
# Should-Start:
# Required-Stop:
# Should-Stop:
@ -28,13 +32,13 @@
. /lib/lsb/init-functions
case "${1}" in
stop)
start)
log_info_msg "Restarting system..."
reboot -d -f -i
;;
*)
echo "Usage: ${0} {stop}"
echo "Usage: ${0} {start}"
exit 1
;;