Changes in / [388ffda4:d6796c8]
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/ChangeLog
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 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> -
chapter05/glibc.xml
r388ffda4 rd6796c8 81 81 82 82 <para>Ensure that the <command>ldconfig</command> and <command>sln</command> 83 utilit es are installed into83 utilities are installed into 84 84 <filename class="directory">/usr/sbin</filename>:</para> 85 85 -
chapter07/cleanup.xml
r388ffda4 rd6796c8 88 88 <para> 89 89 Because the backup archive is compressed, it takes a relatively 90 long time (over 10 minutes) even on a re sonably fast system.90 long time (over 10 minutes) even on a reasonably fast system. 91 91 </para> 92 92 </note> -
chapter07/util-linux.xml
r388ffda4 rd6796c8 73 73 <listitem> 74 74 <para>This sets the location of the file recording information about 75 the hardware clock in accordance to the FHS. This is not stric ly75 the hardware clock in accordance to the FHS. This is not strictly 76 76 needed for this temporary tool, but it prevents creating a file 77 77 at another location, which would not be overwritten or removed -
chapter08/glibc.xml
r388ffda4 rd6796c8 64 64 65 65 <para>Ensure that the <command>ldconfig</command> and <command>sln</command> 66 utilit es will be installed into66 utilities will be installed into 67 67 <filename class="directory">/usr/sbin</filename>:</para> 68 68 -
chapter08/jinja2.xml
r388ffda4 rd6796c8 25 25 26 26 <para>Jinja2 is a Python module that implements a simple pythonic template 27 lan uage.</para>27 language.</para> 28 28 29 29 <segmentedlist> -
chapter08/libffi.xml
r388ffda4 rd6796c8 45 45 <note> 46 46 <para>Similar to GMP, libffi builds with optimizations specific 47 to the proc cesor in use. If building for another system, export47 to the processor in use. If building for another system, export 48 48 CFLAGS and CXXFLAGS to specify a generic build for your architecture. 49 49 If this is not done, all applications that link to libffi will trigger -
chapter08/stripping.xml
r388ffda4 rd6796c8 42 42 43 43 <note><para>The ELF loader's name is ld-linux-x86-64.so.2 on 64-bit systems 44 and ld-linux.so.2 on 32-bit systems. The con truct below selects the44 and ld-linux.so.2 on 32-bit systems. The construct below selects the 45 45 correct name for the current architecture.</para></note> 46 46 -
chapter09/inputrc.xml
r388ffda4 rd6796c8 43 43 set horizontal-scroll-mode Off 44 44 45 # Enable 8 bit input45 # Enable 8-bit input 46 46 set meta-flag On 47 47 set input-meta On -
chapter09/systemd-custom.xml
r388ffda4 rd6796c8 164 164 <para><command>systemctl show -p Wants <replaceable><multi-user.target></replaceable></command>: 165 165 shows all units that depend on the multi-user target. Targets are 166 special unit files that are an ogalous to runlevels under166 special unit files that are analogous to runlevels under 167 167 SysVinit.</para> 168 168 </listitem> -
chapter09/usage.xml
r388ffda4 rd6796c8 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
r388ffda4 rd6796c8 390 390 <!ENTITY less-fin-sbu "less than 0.1 SBU"> 391 391 392 <!ENTITY lfs-bootscripts-version "202 10608"> <!-- Scripts depend on this format -->392 <!ENTITY lfs-bootscripts-version "20220324"> <!-- Scripts depend on this format --> 393 393 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> 394 394 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
Note:
See TracChangeset
for help on using the changeset viewer.