aboutsummaryrefslogtreecommitdiffstats
path: root/bootscripts
diff options
context:
space:
mode:
authorPierre Labastie <pierre.labastie@neuf.fr>2022-03-22 14:29:15 +0100
committerPierre Labastie <pierre.labastie@neuf.fr>2022-03-25 10:52:17 +0100
commit253925339919fbf3b4085889c59241bf7aad96e6 (patch)
treef3644eb5764b6a591eb4a373e7577b1b16488424 /bootscripts
parent3b20f597b2e75d8cbdaa41f2618eb6c899af14b7 (diff)
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
Diffstat (limited to 'bootscripts')
-rw-r--r--bootscripts/lfs/init.d/halt10
-rw-r--r--bootscripts/lfs/init.d/reboot12
2 files changed, 15 insertions, 7 deletions
diff --git a/bootscripts/lfs/init.d/halt b/bootscripts/lfs/init.d/halt
index f8bfc70c2..46ccecf4f 100644
--- a/bootscripts/lfs/init.d/halt
+++ b/bootscripts/lfs/init.d/halt
@@ -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
diff --git a/bootscripts/lfs/init.d/reboot b/bootscripts/lfs/init.d/reboot
index 9e4dd1146..b41b03396 100644
--- a/bootscripts/lfs/init.d/reboot
+++ b/bootscripts/lfs/init.d/reboot
@@ -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
;;