Changeset 75af69e


Ignore:
Timestamp:
03/26/2022 04:45:09 AM (2 years ago)
Author:
Thomas Trepl (Moody) <thomas@…>
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.
Message:

Automatic merge of trunk into multilib

Files:
13 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    r051c160 r75af69e  
     12022-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
    162021-06-08 Bruce Dubbs <bdubbs@linuxfromscratch.org>
    27   * When shutting down the network, ignore invalid interfaces
  • bootscripts/Makefile

    r051c160 r75af69e  
    8989        ln -sf ../init.d/network     ${ETCDIR}/rc.d/rc0.d/K80network
    9090        ln -sf ../init.d/sysklogd    ${ETCDIR}/rc.d/rc0.d/K90sysklogd
    91         ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc0.d/S60sendsignals
    92         ln -sf ../init.d/swap        ${ETCDIR}/rc.d/rc0.d/S65swap
    93         ln -sf ../init.d/mountfs     ${ETCDIR}/rc.d/rc0.d/S70mountfs
    94         ln -sf ../init.d/localnet    ${ETCDIR}/rc.d/rc0.d/S90localnet
     91        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
    9595        ln -sf ../init.d/halt        ${ETCDIR}/rc.d/rc0.d/S99halt
    9696
     
    100100
    101101rc2: files
    102         ln -sf ../init.d/network     ${ETCDIR}/rc.d/rc2.d/K80network
    103         ln -sf ../init.d/sysklogd    ${ETCDIR}/rc.d/rc2.d/K90sysklogd
     102        ln -sf ../init.d/network     ${ETCDIR}/rc.d/rc2.d/S10network
     103        ln -sf ../init.d/sysklogd    ${ETCDIR}/rc.d/rc2.d/S20sysklogd
    104104
    105105rc3: files
     
    118118        ln -sf ../init.d/network     ${ETCDIR}/rc.d/rc6.d/K80network
    119119        ln -sf ../init.d/sysklogd    ${ETCDIR}/rc.d/rc6.d/K90sysklogd
    120         ln -sf ../init.d/sendsignals ${ETCDIR}/rc.d/rc6.d/S60sendsignals
    121         ln -sf ../init.d/swap        ${ETCDIR}/rc.d/rc6.d/S65swap
    122         ln -sf ../init.d/mountfs     ${ETCDIR}/rc.d/rc6.d/S70mountfs
    123         ln -sf ../init.d/localnet    ${ETCDIR}/rc.d/rc6.d/S90localnet
     120        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
    124124        ln -sf ../init.d/reboot      ${ETCDIR}/rc.d/rc6.d/S99reboot
    125125
  • bootscripts/lfs/init.d/console

    r051c160 r75af69e  
    3232# Native English speakers probably don't have /etc/sysconfig/console at all
    3333[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
    34 
    35 is_true()
    36 {
    37    [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
    38 }
    3934
    4035failed=0
  • bootscripts/lfs/init.d/halt

    r051c160 r75af69e  
    88#               DJ Lucas - dj@linuxfromscratch.org
    99# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
     10#             : Pierre Labastie - pierre@linuxfromscratch.org
    1011#
    1112# Version     : LFS 7.0
     13#
     14# Notes       : Update March 24th, 2022: change "stop" to "start".
     15#               Add the $last facility to Required-start
    1216#
    1317########################################################################
     
    1519### BEGIN INIT INFO
    1620# Provides:            halt
    17 # Required-Start:
     21# Required-Start:      $last
    1822# Should-Start:
    1923# Required-Stop:
     
    2731
    2832case "${1}" in
    29    stop)
     33   start)
    3034      halt -d -f -i -p
    3135      ;;
    3236
    3337   *)
    34       echo "Usage: {stop}"
     38      echo "Usage: {start}"
    3539      exit 1
    3640      ;;
  • bootscripts/lfs/init.d/network

    r051c160 r75af69e  
    2121# Required-Stop:       $local_fs localnet swap
    2222# Should-Stop:         $syslog firewalld iptables nftables
    23 # Default-Start:       3 4 5
    24 # Default-Stop:        0 1 2 6
     23# Default-Start:       2 3 4 5
     24# Default-Stop:        0 1 6
    2525# Short-Description:   Starts and configures network interfaces.
    2626# Description:         Starts and configures network interfaces.
     
    3030case "${1}" in
    3131   start)
     32      # if the default route exists, network is already configured
     33      if ip route | grep -q "^default"; then return 0; fi
    3234      # Start all network interfaces
    3335      for file in /etc/sysconfig/ifconfig.*
  • bootscripts/lfs/init.d/rc

    r051c160 r75af69e  
    77# Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
    88#             : 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
    1011#
    1112# Version     : LFS 7.0
    1213#
     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).
    1321########################################################################
    1422
     
    145153[ -r /run/interactive ] && source /run/interactive
    146154
    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
    149158if [ "${previous}" != "N" ]; then
    150159   for i in $(ls -v /etc/rc.d/rc${runlevel}.d/K* 2> /dev/null)
     
    156165      fi
    157166
    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
    172169
    173170      run ${i} stop
     
    185182
    186183
    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
    188188for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null)
    189189do
     190
    190191   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
    196194   fi
    197195
    198196   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
    212203
    213204   error_value=${?}
  • bootscripts/lfs/init.d/reboot

    r051c160 r75af69e  
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
    88#               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
    1011#
    1112# Version     : LFS 7.0
     13#
     14# Notes       : Update March 24th, 2022: change "stop" to "start".
     15#               Add the $last facility to Required-start
    1216#
    1317########################################################################
     
    1519### BEGIN INIT INFO
    1620# Provides:            reboot
    17 # Required-Start:
     21# Required-Start:      $last
    1822# Should-Start:
    1923# Required-Stop:
     
    2933
    3034case "${1}" in
    31    stop)
     35   start)
    3236      log_info_msg "Restarting system..."
    3337      reboot -d -f -i
     
    3539
    3640   *)
    37       echo "Usage: ${0} {stop}"
     41      echo "Usage: ${0} {start}"
    3842      exit 1
    3943      ;;
  • bootscripts/lfs/init.d/sysklogd

    r051c160 r75af69e  
    1919# Required-Stop:       $local_fs
    2020# Should-Stop:         sendsignals
    21 # Default-Start:       3 4 5
    22 # Default-Stop:        0 1 2 6
     21# Default-Start:       2 3 4 5
     22# Default-Stop:        0 1 6
    2323# Short-Description:   Starts kernel and system log daemons.
    2424# Description:         Starts kernel and system log daemons.
     
    2626# X-LFS-Provided-By:   LFS
    2727### END INIT INFO
    28 
    29 # Note: sysklogd is not started in runlevel 2 due to possible
    30 # remote logging configurations
    3128
    3229. /lib/lsb/init-functions
  • bootscripts/lfs/init.d/template

    r051c160 r75af69e  
    3131   start)
    3232      log_info_msg "Starting..."
     33    # if it is possible to use start_daemon
    3334      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
    3441      ;;
    3542
    3643   stop)
    3744      log_info_msg "Stopping..."
     45    # if it is possible to use killproc
    3846      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
    3953      ;;
    4054
  • bootscripts/lfs/lib/services/init-functions

    r051c160 r75af69e  
    701701################################################################################
    702702# evaluate_retval()                                                            #
    703 # Usage: Evaluate a return value and print success or failyure as appropriate  #
     703# Usage: Evaluate a return value and print success or failure as appropriate  #
    704704#                                                                              #
    705705# Purpose: Convenience function to terminate an info message                   #
  • chapter01/changelog.xml

    r051c160 r75af69e  
    4040    appropriate for the entry or if needed the entire day's listitem.
    4141    -->
     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>
    4252
    4353    <listitem>
  • chapter09/usage.xml

    r051c160 r75af69e  
    158158  is encountered, the appropriate script is run with the
    159159  <parameter>start</parameter> argument.</para>
    160 
     160<!-- Changed for March 24th, 2022 version of bootscripts
    161161  <para>There is one exception to this explanation. Links that start
    162162  with an <emphasis>S</emphasis> in the <filename
     
    171171  <parameter>stop</parameter> parameter.
    172172  </para>
    173 
     173-->
    174174  <para>These are descriptions of what the arguments make the scripts
    175175  do:</para>
  • packages.ent

    r051c160 r75af69e  
    395395<!ENTITY less-fin-sbu "less than 0.1 SBU">
    396396
    397 <!ENTITY lfs-bootscripts-version "20210608">      <!-- Scripts depend on this format -->
     397<!ENTITY lfs-bootscripts-version "20220324">      <!-- Scripts depend on this format -->
    398398<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
    399399<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
Note: See TracChangeset for help on using the changeset viewer.