Changeset d6796c8


Ignore:
Timestamp:
03/26/2022 03:10:13 PM (2 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/clfs-ng
Children:
9dbad556
Parents:
388ffda4 (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:

Merge branch 'trunk' into xry111/clfs-ng

Files:
22 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    r388ffda4 rd6796c8  
     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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    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>
  • chapter05/glibc.xml

    r388ffda4 rd6796c8  
    8181
    8282    <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
    83     utilites are installed into
     83    utilities are installed into
    8484    <filename class="directory">/usr/sbin</filename>:</para>
    8585
  • chapter07/cleanup.xml

    r388ffda4 rd6796c8  
    8888       <para>
    8989          Because the backup archive is compressed, it takes a relatively
    90           long time (over 10 minutes) even on a resonably fast system.
     90          long time (over 10 minutes) even on a reasonably fast system.
    9191       </para>
    9292    </note>
  • chapter07/util-linux.xml

    r388ffda4 rd6796c8  
    7373        <listitem>
    7474          <para>This sets the location of the file recording information about
    75           the hardware clock in accordance to the FHS. This is not stricly
     75          the hardware clock in accordance to the FHS. This is not strictly
    7676          needed for this temporary tool, but it prevents creating a file
    7777          at another location, which would not be overwritten or removed
  • chapter08/glibc.xml

    r388ffda4 rd6796c8  
    6464
    6565    <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
    66     utilites will be installed into
     66    utilities will be installed into
    6767    <filename class="directory">/usr/sbin</filename>:</para>
    6868
  • chapter08/jinja2.xml

    r388ffda4 rd6796c8  
    2525
    2626    <para>Jinja2 is a Python module that implements a simple pythonic template
    27     lanuage.</para>
     27    language.</para>
    2828
    2929    <segmentedlist>
  • chapter08/libffi.xml

    r388ffda4 rd6796c8  
    4545    <note>
    4646      <para>Similar to GMP, libffi builds with optimizations specific
    47       to the proccesor in use. If building for another system, export
     47      to the processor in use. If building for another system, export
    4848      CFLAGS and CXXFLAGS to specify a generic build for your architecture.
    4949      If this is not done, all applications that link to libffi will trigger
  • chapter08/stripping.xml

    r388ffda4 rd6796c8  
    4242
    4343  <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 contruct below selects the
     44  and ld-linux.so.2 on 32-bit systems.  The construct below selects the
    4545  correct name for the current architecture.</para></note>
    4646
  • chapter09/inputrc.xml

    r388ffda4 rd6796c8  
    4343set horizontal-scroll-mode Off
    4444
    45 # Enable 8bit input
     45# Enable 8-bit input
    4646set meta-flag On
    4747set input-meta On
  • chapter09/systemd-custom.xml

    r388ffda4 rd6796c8  
    164164         <para><command>systemctl show -p Wants <replaceable>&lt;multi-user.target&gt;</replaceable></command>:
    165165         shows all units that depend on the multi-user target. Targets are
    166          special unit files that are anogalous to runlevels under
     166         special unit files that are analogous to runlevels under
    167167         SysVinit.</para>
    168168       </listitem>
  • chapter09/usage.xml

    r388ffda4 rd6796c8  
    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

    r388ffda4 rd6796c8  
    390390<!ENTITY less-fin-sbu "less than 0.1 SBU">
    391391
    392 <!ENTITY lfs-bootscripts-version "20210608">      <!-- Scripts depend on this format -->
     392<!ENTITY lfs-bootscripts-version "20220324">      <!-- Scripts depend on this format -->
    393393<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
    394394<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
Note: See TracChangeset for help on using the changeset viewer.