Changeset 75af69e
- Timestamp:
- 03/26/2022 04:45:09 AM (2 years ago)
- Branches:
- multilib
- Children:
- 355d761
- Parents:
- 051c160 (diff), 827cc05 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/ChangeLog
r051c160 r75af69e 1 2022-03-24 Pierre Labastie <pierre dot labastie at neuf dot fr> 2 * New semantics for K and S scripts: 3 - S scripts only started if not already marked S in the previous runlevel 4 - K scripts only started if not already marked K in the previous runlevel 5 - remove the convention of running S scripts ith "stop" in rl 0/6 1 6 2021-06-08 Bruce Dubbs <bdubbs@linuxfromscratch.org> 2 7 * When shutting down the network, ignore invalid interfaces -
bootscripts/Makefile
r051c160 r75af69e 89 89 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc0.d/K80network 90 90 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc0.d/K90sysklogd 91 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/ S60sendsignals92 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/ S65swap93 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/ S70mountfs94 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/ S90localnet91 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/K92sendsignals 92 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/K94swap 93 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/K96mountfs 94 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/K98localnet 95 95 ln -sf ../init.d/halt ${ETCDIR}/rc.d/rc0.d/S99halt 96 96 … … 100 100 101 101 rc2: files 102 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc2.d/ K80network103 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc2.d/ K90sysklogd102 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc2.d/S10network 103 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc2.d/S20sysklogd 104 104 105 105 rc3: files … … 118 118 ln -sf ../init.d/network ${ETCDIR}/rc.d/rc6.d/K80network 119 119 ln -sf ../init.d/sysklogd ${ETCDIR}/rc.d/rc6.d/K90sysklogd 120 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc 6.d/S60sendsignals121 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc 6.d/S65swap122 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc 6.d/S70mountfs123 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc 6.d/S90localnet120 ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/K92sendsignals 121 ln -sf ../init.d/swap ${ETCDIR}/rc.d/rc0.d/K94swap 122 ln -sf ../init.d/mountfs ${ETCDIR}/rc.d/rc0.d/K96mountfs 123 ln -sf ../init.d/localnet ${ETCDIR}/rc.d/rc0.d/K98localnet 124 124 ln -sf ../init.d/reboot ${ETCDIR}/rc.d/rc6.d/S99reboot 125 125 -
bootscripts/lfs/init.d/console
r051c160 r75af69e 32 32 # Native English speakers probably don't have /etc/sysconfig/console at all 33 33 [ -r /etc/sysconfig/console ] && . /etc/sysconfig/console 34 35 is_true()36 {37 [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]38 }39 34 40 35 failed=0 -
bootscripts/lfs/init.d/halt
r051c160 r75af69e 8 8 # DJ Lucas - dj@linuxfromscratch.org 9 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 # : Pierre Labastie - pierre@linuxfromscratch.org 10 11 # 11 12 # Version : LFS 7.0 13 # 14 # Notes : Update March 24th, 2022: change "stop" to "start". 15 # Add the $last facility to Required-start 12 16 # 13 17 ######################################################################## … … 15 19 ### BEGIN INIT INFO 16 20 # Provides: halt 17 # Required-Start: 21 # Required-Start: $last 18 22 # Should-Start: 19 23 # Required-Stop: … … 27 31 28 32 case "${1}" in 29 st op)33 start) 30 34 halt -d -f -i -p 31 35 ;; 32 36 33 37 *) 34 echo "Usage: {st op}"38 echo "Usage: {start}" 35 39 exit 1 36 40 ;; -
bootscripts/lfs/init.d/network
r051c160 r75af69e 21 21 # Required-Stop: $local_fs localnet swap 22 22 # Should-Stop: $syslog firewalld iptables nftables 23 # Default-Start: 3 4 524 # Default-Stop: 0 1 2623 # Default-Start: 2 3 4 5 24 # Default-Stop: 0 1 6 25 25 # Short-Description: Starts and configures network interfaces. 26 26 # Description: Starts and configures network interfaces. … … 30 30 case "${1}" in 31 31 start) 32 # if the default route exists, network is already configured 33 if ip route | grep -q "^default"; then return 0; fi 32 34 # Start all network interfaces 33 35 for file in /etc/sysconfig/ifconfig.* -
bootscripts/lfs/init.d/rc
r051c160 r75af69e 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 8 # : DJ Lucas - dj@linuxfromscratch.org 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 # Updates : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 # : Pierre Labastie - pierre@linuxfromscratch.org 10 11 # 11 12 # Version : LFS 7.0 12 13 # 14 # Notes : Updates March 24th, 2022: new semantics of S/K files 15 # - Instead of testing that S scripts were K scripts in the 16 # previous runlevel, test that they were not S scripts 17 # - Instead of testing that K scripts were S scripts in the 18 # previous runlevel, test that they were not K scripts 19 # - S scripts in runlevel 0 or 6 are now run with 20 # "script start" (was "script stop" previously). 13 21 ######################################################################## 14 22 … … 145 153 [ -r /run/interactive ] && source /run/interactive 146 154 147 # Attempt to stop all services started by the previous runlevel, 148 # and killed in this runlevel 155 # Stop all services marked as K, except if marked as K in the previous 156 # runlevel: it is the responsibility of the script to not try to kill 157 # a non running service 149 158 if [ "${previous}" != "N" ]; then 150 159 for i in $(ls -v /etc/rc.d/rc${runlevel}.d/K* 2> /dev/null) … … 156 165 fi 157 166 158 suffix=${i#/etc/rc.d/rc$runlevel.d/K[0-9][0-9]} 159 prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix 160 sysinit_start=/etc/rc.d/rcS.d/S[0-9][0-9]$suffix 161 162 if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then 163 if [ ! -f ${prev_start} -a ! -f ${sysinit_start} ]; then 164 MSG="WARNING:\n\n${i} can't be " 165 MSG="${MSG}executed because it was not " 166 MSG="${MSG}not started in the previous " 167 MSG="${MSG}runlevel (${previous})." 168 log_warning_msg "$MSG" 169 continue 170 fi 171 fi 167 suffix=${i#/etc/rc.d/rc${runlevel}.d/K[0-9][0-9]} 168 [ -e /etc/rc.d/rc${previous}.d/K[0-9][0-9]$suffix ] && continue 172 169 173 170 run ${i} stop … … 185 182 186 183 187 # Start all functions in this runlevel 184 # Start all services marked as S in this runlevel, except if marked as 185 # S in the previous runlevel 186 # it is the responsabily of the script to not try to start an already running 187 # service 188 188 for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null) 189 189 do 190 190 191 if [ "${previous}" != "N" ]; then 191 suffix=${i#/etc/rc.d/rc$runlevel.d/S[0-9][0-9]} 192 stop=/etc/rc.d/rc$runlevel.d/K[0-9][0-9]$suffix 193 prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix 194 195 [ -f ${prev_start} -a ! -f ${stop} ] && continue 192 suffix=${i#/etc/rc.d/rc${runlevel}.d/S[0-9][0-9]} 193 [ -e /etc/rc.d/rc${previous}.d/S[0-9][0-9]$suffix ] && continue 196 194 fi 197 195 198 196 check_script_status 199 if [ "${SCRIPT_STAT}" == "1" ]; then 200 SCRIPT_STAT="0" 201 continue 202 fi 203 204 case ${runlevel} in 205 0|6) 206 run ${i} stop 207 ;; 208 *) 209 run ${i} start 210 ;; 211 esac 197 if [ "${SCRIPT_STAT}" == "1" ]; then 198 SCRIPT_STAT="0" 199 continue 200 fi 201 202 run ${i} start 212 203 213 204 error_value=${?} -
bootscripts/lfs/init.d/reboot
r051c160 r75af69e 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 8 # DJ Lucas - dj@linuxfromscratch.org 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 # Updates : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 # : Pierre Labastie - pierre@linuxfromscratch.org 10 11 # 11 12 # Version : LFS 7.0 13 # 14 # Notes : Update March 24th, 2022: change "stop" to "start". 15 # Add the $last facility to Required-start 12 16 # 13 17 ######################################################################## … … 15 19 ### BEGIN INIT INFO 16 20 # Provides: reboot 17 # Required-Start: 21 # Required-Start: $last 18 22 # Should-Start: 19 23 # Required-Stop: … … 29 33 30 34 case "${1}" in 31 st op)35 start) 32 36 log_info_msg "Restarting system..." 33 37 reboot -d -f -i … … 35 39 36 40 *) 37 echo "Usage: ${0} {st op}"41 echo "Usage: ${0} {start}" 38 42 exit 1 39 43 ;; -
bootscripts/lfs/init.d/sysklogd
r051c160 r75af69e 19 19 # Required-Stop: $local_fs 20 20 # Should-Stop: sendsignals 21 # Default-Start: 3 4 522 # Default-Stop: 0 1 2621 # Default-Start: 2 3 4 5 22 # Default-Stop: 0 1 6 23 23 # Short-Description: Starts kernel and system log daemons. 24 24 # Description: Starts kernel and system log daemons. … … 26 26 # X-LFS-Provided-By: LFS 27 27 ### END INIT INFO 28 29 # Note: sysklogd is not started in runlevel 2 due to possible30 # remote logging configurations31 28 32 29 . /lib/lsb/init-functions -
bootscripts/lfs/init.d/template
r051c160 r75af69e 31 31 start) 32 32 log_info_msg "Starting..." 33 # if it is possible to use start_daemon 33 34 start_daemon fully_qualified_path 35 # if it is not possible to use start_daemon 36 # (command to start the daemon is not simple enough) 37 if ! pidofproc daemon_name_as_reported_by_ps >/dev/null; then 38 command_to_start_the_service 39 fi 40 evaluate_retval 34 41 ;; 35 42 36 43 stop) 37 44 log_info_msg "Stopping..." 45 # if it is possible to use killproc 38 46 killproc fully_qualified_path 47 # if it is not possible to use killproc 48 # (the daemon shoudn't be stopped by killing it) 49 if pidofproc daemon_name_as_reported_by_ps >/dev/null; then 50 command_to_stop_the_service 51 fi 52 evaluate_retval 39 53 ;; 40 54 -
bootscripts/lfs/lib/services/init-functions
r051c160 r75af69e 701 701 ################################################################################ 702 702 # evaluate_retval() # 703 # Usage: Evaluate a return value and print success or fail yure as appropriate #703 # Usage: Evaluate a return value and print success or failure as appropriate # 704 704 # # 705 705 # Purpose: Convenience function to terminate an info message # -
chapter01/changelog.xml
r051c160 r75af69e 40 40 appropriate for the entry or if needed the entire day's listitem. 41 41 --> 42 43 <listitem> 44 <para>2022-03-25</para> 45 <itemizedlist> 46 <listitem> 47 <para>[pierre] - Update bootscripts to 20220324. Fixes 48 <ulink url="&lfs-ticket-root;5027">#5027</ulink>.</para> 49 </listitem> 50 </itemizedlist> 51 </listitem> 42 52 43 53 <listitem> -
chapter09/usage.xml
r051c160 r75af69e 158 158 is encountered, the appropriate script is run with the 159 159 <parameter>start</parameter> argument.</para> 160 160 <!-- Changed for March 24th, 2022 version of bootscripts 161 161 <para>There is one exception to this explanation. Links that start 162 162 with an <emphasis>S</emphasis> in the <filename … … 171 171 <parameter>stop</parameter> parameter. 172 172 </para> 173 173 --> 174 174 <para>These are descriptions of what the arguments make the scripts 175 175 do:</para> -
packages.ent
r051c160 r75af69e 395 395 <!ENTITY less-fin-sbu "less than 0.1 SBU"> 396 396 397 <!ENTITY lfs-bootscripts-version "202 10608"> <!-- Scripts depend on this format -->397 <!ENTITY lfs-bootscripts-version "20220324"> <!-- Scripts depend on this format --> 398 398 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> 399 399 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
Note:
See TracChangeset
for help on using the changeset viewer.