Ignore:
Timestamp:
08/31/2008 06:24:27 AM (16 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
1e6b6d5
Parents:
59dc6e1
Message:

See contrib/lsb-v3/ChangeLog

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8555 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
bootscripts/contrib/lsb-v3
Files:
1 added
20 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/contrib/lsb-v3/ChangeLog

    r59dc6e1 r010d108  
    11ChangeLog
     220080831 - [dj] * Corrected more, and minimized dependencies in scripts.
     3                * Don't try to write to bootlog in 0 and 6.
     4                * Use /etc/rcS.d instead of /etc/rcsysinit.d - added
     5                  replacement /etc/inittab file
    26
    3 20080830 - [dj] * Corrected remaining dependency errors in scrpt headers.
     720080830 - [dj] * Corrected remaining dependency errors in script headers.
    48
    5920080531 - [dj] * Synced with LFS-Bootscrpts-20080531 (use udevadm)
  • bootscripts/contrib/lsb-v3/Makefile

    r59dc6e1 r010d108  
    1515        install -d -m ${DIRMODE} ${EXTDIR}/rc5.d
    1616        install -d -m ${DIRMODE} ${EXTDIR}/rc6.d
    17         install -d -m ${DIRMODE} ${EXTDIR}/rcsysinit.d
     17        install -d -m ${DIRMODE} ${EXTDIR}/rcS.d
    1818        install -d -m ${DIRMODE} ${EXTDIR}/init.d
    1919        install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
     
    7575        ln -sf ../init.d/localnet    ${EXTDIR}/rc6.d/S90localnet
    7676        ln -sf ../init.d/reboot      ${EXTDIR}/rc6.d/S99reboot
    77         ln -sf ../init.d/mountkernfs ${EXTDIR}/rcsysinit.d/S00mountkernfs
    78         ln -sf ../init.d/sysctl      ${EXTDIR}/rcsysinit.d/S05sysctl
    79         ln -sf ../init.d/modules     ${EXTDIR}/rcsysinit.d/S10modules
    80         ln -sf ../init.d/udev        ${EXTDIR}/rcsysinit.d/S15udev
    81         ln -sf ../init.d/swap        ${EXTDIR}/rcsysinit.d/S20swap
    82         ln -sf ../init.d/setclock    ${EXTDIR}/rcsysinit.d/S25setclock
    83         ln -sf ../init.d/checkfs     ${EXTDIR}/rcsysinit.d/S30checkfs
    84         ln -sf ../init.d/mountfs     ${EXTDIR}/rcsysinit.d/S40mountfs
    85         ln -sf ../init.d/udev_retry  ${EXTDIR}/rcsysinit.d/S45udev_retry
    86         ln -sf ../init.d/cleanfs     ${EXTDIR}/rcsysinit.d/S50cleanfs
    87         ln -sf ../init.d/console     ${EXTDIR}/rcsysinit.d/S70console
    88         ln -sf ../init.d/localnet    ${EXTDIR}/rcsysinit.d/S80localnet
     77        ln -sf ../init.d/mountkernfs ${EXTDIR}/rcS.d/S00mountkernfs
     78        ln -sf ../init.d/sysctl      ${EXTDIR}/rcS.d/S05sysctl
     79        ln -sf ../init.d/modules     ${EXTDIR}/rcS.d/S10modules
     80        ln -sf ../init.d/udev        ${EXTDIR}/rcS.d/S15udev
     81        ln -sf ../init.d/swap        ${EXTDIR}/rcS.d/S20swap
     82        ln -sf ../init.d/setclock    ${EXTDIR}/rcS.d/S25setclock
     83        ln -sf ../init.d/checkfs     ${EXTDIR}/rcS.d/S30checkfs
     84        ln -sf ../init.d/mountfs     ${EXTDIR}/rcS.d/S40mountfs
     85        ln -sf ../init.d/udev_retry  ${EXTDIR}/rcS.d/S45udev_retry
     86        ln -sf ../init.d/cleanfs     ${EXTDIR}/rcS.d/S50cleanfs
     87        ln -sf ../init.d/console     ${EXTDIR}/rcS.d/S70console
     88        ln -sf ../init.d/localnet    ${EXTDIR}/rcS.d/S80localnet
    8989        if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} sysconfig/createfiles ${EXTDIR}/sysconfig/; fi
    9090        if [ ! -f ${EXTDIR}/sysconfig/modules     ]; then install -m ${CONFMODE} sysconfig/modules     ${EXTDIR}/sysconfig/; fi
    9191        if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then install -m ${CONFMODE} sysconfig/rc          ${EXTDIR}/sysconfig/; fi
    9292        if [ ! -f ${EXTDIR}/sysconfig/rc.site     ]; then install -m ${CONFMODE} sysconfig/rc.site     ${EXTDIR}/sysconfig/; fi
     93        if [ -f   ${EXTDIR}/inittab               ]; then install -m ${CONFMODE} ${EXTDIR}/inittab     ${EXTDIR}/inittab.bak;
     94        install                   -m ${CONFMODE} etc/inittab ${EXTDIR}/
    9395        install                   -m ${MODE} sysconfig/network-devices/ifup   ${EXTDIR}/sysconfig/network-devices/
    9496        install                   -m ${MODE} sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/
     
    121123        ln -sf ../init.d/swap        ${EXTDIR}/rc6.d/S80swap
    122124        ln -sf ../init.d/reboot      ${EXTDIR}/rc6.d/S99reboot
    123         ln -sf ../init.d/mountkernfs ${EXTDIR}/rcsysinit.d/S00mountkernfs
    124         ln -sf ../init.d/udev        ${EXTDIR}/rcsysinit.d/S10udev
    125         ln -sf ../init.d/swap        ${EXTDIR}/rcsysinit.d/S20swap
    126         ln -sf ../init.d/setclock    ${EXTDIR}/rcsysinit.d/S25setclock
    127         ln -sf ../init.d/checkfs     ${EXTDIR}/rcsysinit.d/S30checkfs
    128         ln -sf ../init.d/mountfs     ${EXTDIR}/rcsysinit.d/S40mountfs
    129         ln -sf ../init.d/cleanfs     ${EXTDIR}/rcsysinit.d/S50cleanfs
     125        ln -sf ../init.d/mountkernfs ${EXTDIR}/rcS.d/S00mountkernfs
     126        ln -sf ../init.d/udev        ${EXTDIR}/rcS.d/S10udev
     127        ln -sf ../init.d/swap        ${EXTDIR}/rcS.d/S20swap
     128        ln -sf ../init.d/setclock    ${EXTDIR}/rcS.d/S25setclock
     129        ln -sf ../init.d/checkfs     ${EXTDIR}/rcS.d/S30checkfs
     130        ln -sf ../init.d/mountfs     ${EXTDIR}/rcS.d/S40mountfs
     131        ln -sf ../init.d/cleanfs     ${EXTDIR}/rcS.d/S50cleanfs
    130132        if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then install -m ${CONFMODE} sysconfig/rc          ${EXTDIR}/sysconfig/; fi
    131133
  • bootscripts/contrib/lsb-v3/README

    r59dc6e1 r010d108  
    22
    33The scripts contianed in this directory are a complete rewrite of the
    4 boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-04-13).  As is
     4boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-05-31).  As is
    55usually the case with a rewrite, there have been many changes:
    66
     
    1717
    1818LSB 3.1 Omissions - Unfortunately, this package is not completely LSB
    19 compliant as it lacks install-initd and remove-initd programs.  The current
     19compliant as it lacks install_initd and remove_initd programs.  The current
    2020popular flavor of these programs is written in Python, which, as you should
    2121know, is not installed until BLFS.  I began work on a bash implementation,
    2222and have provided the needed functions to parse the LSB headers in the
    2323manage-functions script (insalled by default into /lib/lsb).  Unfortunately,
    24 I have yet to complete the actual install-initd and remove-initd scripts,
    25 however, I do have an almost complete install-initd kept locally.  I am
    26 currently working on a separate script to completely rewrite the symlinks
    27 should LFS default values not prove sufficient when working with scripts in
    28 the wild.  I have not included either here because they are not yet complete
    29 or thoroughly tested, and due to the development process of lfs-bootscritps,
    30 would be included in a release tarball.  If you would like to assist with the
    31 development of these scripts, or would even just like to see what I have so
    32 far, please email me privately.  Of course, feel free to write your own if you
    33 do not like the manage-fucntions script (or bash).
     24I have yet to complete the actual install_initd and remove_initd scripts,
     25and have found bash to an unsuitable language to write a complete reorder
     26due to the ammount of time for recursive funtions and loops to complete.
     27Dan Nicholson has began work on initd-tools, a C implementaion of
     28install_initd and remove_initd.  At the time of writing (20080830) the
     29programs themselves are not yet functional, however, the libraries used
     30to parse the scripts and provide the dependency order are working as
     31expected.  I would expect a completely standards compliant set of programs,
     32written in C very soon. Dans work can be viewed via git-web at
     33http://gitweb.dwcab.com/?p=initd-tools.git;a=summary .
    3434
    3535Distribution Independent - this original goal for the LFS scripts has been
     
    6363is configurable in the /etc/sysconfig/rc.site file.
    6464
    65 RC_BASE - The base directory for the bootscripts is now /etc, not
     65Path changes - The base directory for the bootscripts is now /etc, not
    6666/etc/rc.d.  This is mostly to conform with mainstream distros, but other
    6767boot methods do expect that /etc/init.d is the location of bootscripts.
     
    7070flying fingers accustomed to it!  Of course, this is still configurable in
    7171/etc/sysconfig/rc.site, and if the change is too great, I'll put it back.
     72I've also removed the rcsysinit.d and replaced it with rcS.d.
    7273
    7374LSB Functions - The previous lfs-bootscripts sourced a functions file
    7475located at /etc/rc.d/init.d/functions.  This file has been renamed
    7576$distro-functions to segregate it from the old. The name is configurable
    76 by the rc.site configuration file.  Both old and new bootscripts can be
    77 used simultaneously in a SYS-V setup (with proper symlinks in place).
    78 LSB defined functions are used where possible, but the $distro-functions file
    79 provides, easy to use wraper functions that
    80 start/stop/reload/force-reload/restart programs, evaluate the numerical
    81 LSB return values, and print status messages to the screen.  Both LFS
    82 functions and LSB functions are documented directly in the scritps located
    83 at /etc/init.d/$distro-functions and /lib/lsb/init-functions respectively.
     77by the rc.site configuration file.  LSB defined functions are used where
     78possible, but the $distro-functions file provides, easy to use wraper
     79functions that start/stop/reload/force-reload/restart programs, evaluate
     80the numerical LSB return values, and print status messages to the screen.
     81Both LFS functions and LSB functions are documented directly in the scritps
     82located at /etc/init.d/$distro-functions and /lib/lsb/init-functions
     83respectively.
    8484
    8585Pretier - Yeah, I just couldn't handle all the grey text...  By default,
  • bootscripts/contrib/lsb-v3/init.d/checkfs

    r59dc6e1 r010d108  
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Checks local filesystems before mounting.
  • bootscripts/contrib/lsb-v3/init.d/cleanfs

    r59dc6e1 r010d108  
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:       
    1212# Short-Description:   Cleans temporary directories early in the boot process.
  • bootscripts/contrib/lsb-v3/init.d/console

    r59dc6e1 r010d108  
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Sets up a localised console.
  • bootscripts/contrib/lsb-v3/init.d/lfs-functions

    r59dc6e1 r010d108  
    8181        log_success_msg "Running with PID(s) ${pidlist}"
    8282    else
    83        
    8483        log_warning_msg "Not running!"
    8584    fi
  • bootscripts/contrib/lsb-v3/init.d/localnet

    r59dc6e1 r010d108  
    77# Should-Start:
    88# Required-Stop:
    9 # Should-Stop:         halt reboot
    10 # Default-Start:       sysinit 0 6
    11 # Default-Stop:
     9# Should-Stop:
     10# Default-Start:       S
     11# Default-Stop:        0 6
    1212# Short-Description:   Starts the local network.
    1313# Description:         Sets the hostname of the machine and starts the
  • bootscripts/contrib/lsb-v3/init.d/modules

    r59dc6e1 r010d108  
    44### BEGIN INIT INFO
    55# Provides:            modules
    6 # Required-Start:      mountkernfs
    7 # Should-Start:        sysctl
     6# Required-Start:      mountkernfs sysctl
     7# Should-Start:
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Loads required modules.
  • bootscripts/contrib/lsb-v3/init.d/mountfs

    r59dc6e1 r010d108  
    66# Required-Start:      udev checkfs
    77# Should-Start:
    8 # Required-Stop:       swap
     8# Required-Stop:       localnet
    99# Should-Stop:
    10 # Default-Start:       sysinit 0 6
    11 # Default-Stop:
    12 # Short-Description:   Mounts and unmounts all local filesystems.
     10# Default-Start:       S
     11# Default-Stop:        0 6
     12# Short-Description:   Mounts/unmounts local filesystems defined in /etc/fstab.
    1313# Description:         Remounts root filesystem read/write and mounts all
    1414#                      remaining local filesystems defined in /etc/fstab on
    15 #                      start.  Rmounts root filesystem read-only and unmounts
     15#                      start.  Remounts root filesystem read-only and unmounts
    1616#                      remaining filesystems on stop.
    1717# X-LFS-Default-Start: S40
  • bootscripts/contrib/lsb-v3/init.d/mountkernfs

    r59dc6e1 r010d108  
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Mounts /sys and /proc virtual (kernel) filesystems.
  • bootscripts/contrib/lsb-v3/init.d/network

    r59dc6e1 r010d108  
    77# Should-Start:
    88# Required-Stop:       $syslog $local_fs swap localnet
    9 # Should-Stop:         halt reboot
     9# Should-Stop:
    1010# Default-Start:       3 4 5
    1111# Default-Stop:        0 1 2 6
     
    3232                                continue
    3333                        fi
    34 
    3534                        IN_BOOT=1 ${NETWORK_DEVICES}/ifup ${interface}
    3635                done
  • bootscripts/contrib/lsb-v3/init.d/rc

    r59dc6e1 r010d108  
    1616
    1717# Do not use the RUNLEVEL and PREVLEVEL variables provided by init so
    18 # that they can be modified and alternate directories (sysinit) can
     18# that they can be modified and alternate directories (S) can
    1919# be used without affecting init
    2020runlevel="${1}"
     
    2727
    2828# Mount a tmpfs to store boot accounting information
    29 if [ "${runlevel}" = "sysinit" -a "${TEMPFS_MOUNT}" != "" ]; then
     29if [ "${runlevel}" = "S" -a "${TEMPFS_MOUNT}" != "" ]; then
    3030    mount -n -t tmpfs tmpfs "${TEMPFS_MOUNT}" -o mode=600
    3131fi
    3232
    3333# Provide an interactive prompt (if requested)
    34 if [ "${runlevel}" = "sysinit" -a "${iprompt}" = "yes" ]; then
     34if [ "${runlevel}" = "S" -a "${iprompt}" = "yes" ]; then
    3535    # ash does not accept t and n flags for read
    3636    ls -l /bin/sh | grep "/ash"
     
    6767
    6868# Source the interactive state file if it exists
    69 if [ "${runlevel}" != "sysinit" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then
     69if [ "${runlevel}" != "S" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then
    7070    . "${TEMPFS_MOUNT}/.interactive-start"
    7171fi
    7272
    73 # Prompt for interactive startup after completing sysinit
    74 if [ "${interactive}" = "I" -a "${runlevel}" != "sysinit" -a \
     73# Prompt for interactive startup after completing S
     74if [ "${interactive}" = "I" -a "${runlevel}" != "S" -a \
    7575    "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
    7676    echo -n -e "Proceed with interactive starup of runlevel "
     
    105105        script=${link#$RC_BASE/rc$runlevel.d/K[0-9][0-9]}
    106106        prev_start=$RC_BASE/rc$prevlevel.d/S[0-9][0-9]$script
    107         sysinit_start=$RC_BASE/rcsysinit.d/S[0-9][0-9]$script
     107        S_start=$RC_BASE/rcS.d/S[0-9][0-9]$script
    108108
    109109        if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
    110             if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; then
     110            if [ ! -f ${prev_start} ] && [ ! -f ${S_start} ]; then
    111111                echo -e -n "${WARNING}WARNING:\n\n${link} can't be"
    112112                echo -e "${WARNING} executed because it was not"
     
    181181# Strip apply time to the logs, strip out any color codes and dump
    182182# the log to /var/log/boot.log
    183 if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "sysinit" ]; then
     183if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "S" ]; then
    184184    # Remove any color codes from the temp log file
    185185    sed -i 's@\\033\[[0-9];[0-9][0-9]m@@g' "${TEMPFS_MOUNT}/.bootlog"
     
    187187    BTIMESPEC=$(echo `date +"%b %d %T"` `hostname`)
    188188    sed -i "s@^bootlog:@${BTIMESPEC} bootlog:@" "${TEMPFS_MOUNT}/.bootlog"
    189     cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log
    190     rm -f "${TEMPFS_MOUNT}/.bootlog"
     189    # Don't try and write in 0 and 6, this is a 'boot' log
     190    if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then
     191        cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log
     192        rm -f "${TEMPFS_MOUNT}/.bootlog"
     193    fi
    191194fi
    192195
  • bootscripts/contrib/lsb-v3/init.d/sendsignals

    r59dc6e1 r010d108  
    77# Should-Start:
    88# Required-Stop:       $local_fs swap localnet
    9 # Should-Stop:         halt reboot
    10 # Default-Start:       0 6
    11 # Default-Stop:
     9# Should-Stop:
     10# Default-Start:
     11# Default-Stop:        0 6
    1212# Short-Description:   Attempts to kill remaining processes.
    1313# Description:         Attempts to kill remaining processes.
  • bootscripts/contrib/lsb-v3/init.d/setclock

    r59dc6e1 r010d108  
    44### BEGIN INIT INFO
    55# Provides:            $time
    6 # Required-Start:      udev swap
     6# Required-Start:      modules
    77# Should-Start:
    8 # Required-Stop:       $network $syslog $local_fs
    9 # Should-Stop:         halt reboot
    10 # Default-Start:       sysinit
    11 # Default-Stop:        
     8# Required-Stop:       $syslog
     9# Should-Stop:
     10# Default-Start:       S
     11# Default-Stop:
    1212# Short-Description:   Stores and restores time from the hardware clock
    1313# Description:         On boot, system time is obtained from hwclock.  The
  • bootscripts/contrib/lsb-v3/init.d/swap

    r59dc6e1 r010d108  
    44### BEGIN INIT INFO
    55# Provides:            swap
    6 # Required-Start:      udev
     6# Required-Start:      modules
    77# Should-Start:
    88# Required-Stop:       localnet
    9 # Should-Stop:         halt reboot
    10 # Default-Start:       sysinit 0 6
    11 # Default-Stop:
     9# Should-Stop:
     10# Default-Start:       S
     11# Default-Stop:        0 6
    1212# Short-Description:   Mounts and unmounts swap partitions.
    1313# Description:         Mounts and unmounts swap partitions defined in
  • bootscripts/contrib/lsb-v3/init.d/sysctl

    r59dc6e1 r010d108  
    44### BEGIN INIT INFO
    55# Provides:            sysctl
    6 # Required-Start:      udev
     6# Required-Start:      mountkernfs
    77# Should-Start:
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Makes changes to the proc filesystem
  • bootscripts/contrib/lsb-v3/init.d/sysklogd

    r59dc6e1 r010d108  
    66# Required-Start:      localnet
    77# Should-Start:
    8 # Required-Stop:       sendsignals $local_fs swap
    9 # Should-Stop:         halt reboot
     8# Required-Stop:       $local_fs
     9# Should-Stop:
    1010# Default-Start:       2 3 4 5
    1111# Default-Stop:        0 1 6
  • bootscripts/contrib/lsb-v3/init.d/udev

    r59dc6e1 r010d108  
    44### BEGIN INIT INFO
    55# Provides:            udev
    6 # Required-Start:      mountkernfs
     6# Required-Start:      modules
    77# Should-Start:
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Populated /dev with device nodes.
  • bootscripts/contrib/lsb-v3/init.d/udev_retry

    r59dc6e1 r010d108  
    88# Required-Stop:
    99# Should-Stop:
    10 # Default-Start:       sysinit
     10# Default-Start:       S
    1111# Default-Stop:
    1212# Short-Description:   Replays failed uevents and creates additonal devices.
Note: See TracChangeset for help on using the changeset viewer.