From 253925339919fbf3b4085889c59241bf7aad96e6 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Tue, 22 Mar 2022 14:29:15 +0100 Subject: 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 --- bootscripts/lfs/init.d/halt | 10 +++++++--- bootscripts/lfs/init.d/reboot | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'bootscripts') 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 ;; -- cgit v1.2.3-54-g00ecf