mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-18 13:07:50 +00:00
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:
parent
3b20f597b2
commit
2539253399
@ -7,14 +7,18 @@
|
|||||||
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
||||||
# DJ Lucas - dj@linuxfromscratch.org
|
# DJ Lucas - dj@linuxfromscratch.org
|
||||||
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
|
# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
|
||||||
|
# : Pierre Labastie - pierre@linuxfromscratch.org
|
||||||
#
|
#
|
||||||
# Version : LFS 7.0
|
# Version : LFS 7.0
|
||||||
#
|
#
|
||||||
|
# Notes : Update March 24th, 2022: change "stop" to "start".
|
||||||
|
# Add the $last facility to Required-start
|
||||||
|
#
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: halt
|
# Provides: halt
|
||||||
# Required-Start:
|
# Required-Start: $last
|
||||||
# Should-Start:
|
# Should-Start:
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
@ -26,12 +30,12 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
stop)
|
start)
|
||||||
halt -d -f -i -p
|
halt -d -f -i -p
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: {stop}"
|
echo "Usage: {start}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -6,15 +6,19 @@
|
|||||||
#
|
#
|
||||||
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
||||||
# DJ Lucas - dj@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
|
# Version : LFS 7.0
|
||||||
#
|
#
|
||||||
|
# Notes : Update March 24th, 2022: change "stop" to "start".
|
||||||
|
# Add the $last facility to Required-start
|
||||||
|
#
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: reboot
|
# Provides: reboot
|
||||||
# Required-Start:
|
# Required-Start: $last
|
||||||
# Should-Start:
|
# Should-Start:
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
@ -28,13 +32,13 @@
|
|||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
stop)
|
start)
|
||||||
log_info_msg "Restarting system..."
|
log_info_msg "Restarting system..."
|
||||||
reboot -d -f -i
|
reboot -d -f -i
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: ${0} {stop}"
|
echo "Usage: ${0} {start}"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user