Changeset f874424


Ignore:
Timestamp:
09/19/2011 03:31:46 AM (13 years ago)
Author:
Bruce Dubbs <bdubbs@…>
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, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
5a58876
Parents:
103bbd6
Message:

Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.
Move network services to /lib/services.
Move init-functions to /lib/lsb.
Make /lib/lsb a symlink to /lib/services.
Create convenience symlink /etc/init.d->/etc/rc.d/init.d
Add help and man pages to ifup/ifdown.

Append /run/var/bootlog to /var/log/boot.log at the end of
the boot sequence.

Add capability to step through the boot scripts at boot time.

Optionally allow environment variables in sysconfig directory's
console, network, and clock files to be placed in rc.site.

Add an optional FASTBOOT parameter to set /fastboot when rebooting.

Remove a minor warning message from udev that is triggered
by the udev_retry boot script.

Add SKIPTMPCLEAN as an optional parameter to skip cleaning /tmp at boot time.

Add a page to Chapter 7 documenting rc.site.

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

Files:
7 added
3 deleted
39 edited
1 moved

Legend:

Unmodified
Added
Removed
  • appendices/scripts.xml

    r103bbd6 rf874424  
    99  <!ENTITY consolelog         SYSTEM "consolelog.script">
    1010  <!ENTITY halt               SYSTEM "halt.script">
     11  <!ENTITY initfunctions      SYSTEM "init-functions.script">
    1112  <!ENTITY localnet           SYSTEM "localnet.script">
    1213  <!ENTITY modules            SYSTEM "modules.script">
     
    5859  </sect1>
    5960
     61  <sect1 id="init-functions" role="wrap">
     62    <title>/lib/lsb/init-functions</title>
     63    <screen>&initfunctions;</screen>
     64  </sect1>
     65
    6066  <sect1 id="functions" role="wrap">
    6167    <title>/etc/rc.d/init.d/functions</title>
     
    174180
    175181  <sect1 id="ifup" role="wrap">
    176     <title>/etc/sysconfig/network-devices/ifup</title>
     182    <title>/sbin/ifup</title>
    177183    <screen>&ifup;</screen>
    178184  </sect1>
    179185
    180186  <sect1 id="ifdown" role="wrap">
    181     <title>/etc/sysconfig/network-devices/ifdown</title>
     187    <title>/sbin/ifdown</title>
    182188    <screen>&ifdown;</screen>
    183189  </sect1>
    184190
    185191  <sect1 id="ipv4static" role="wrap">
    186     <title>/etc/sysconfig/network-devices/services/ipv4-static</title>
     192    <title>/lib/services/ipv4-static</title>
    187193    <screen>&ipv4_static;</screen>
    188194  </sect1>
    189195
    190196  <sect1 id="ipv4route" role="wrap">
    191     <title>/etc/sysconfig/network-devices/services/ipv4-static-route</title>
     197    <title>/lib/services/ipv4-static-route</title>
    192198    <screen>&ipv4_static_route;</screen>
    193199  </sect1>
  • bootscripts/ChangeLog

    r103bbd6 rf874424  
     12100-09-18
     2   * Review and update of changes made in previous change.
     3   ** Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.
     4   ** Move network services to /lib/services.
     5   ** Move init-functions to /lib/lsb.
     6   *** /lib/lsb is a symlink to /lib/services.
     7   * Create convenience symlink /etc/init.d->/etc/rc.d/init.d.
     8   * Add help and man pages to upup/ifdown.
     9   * Append /run/var/bootlog to /var/log/boot.log at the end of
     10     the boot sequence.
     11   * Add capabiltiy to step through the boot scripts at boot time
     12   * Optionally allow environment variables in sysconfig directory's
     13     console, network, and clock files to be placed in rc.site.
     14   * Add an optional FASTBOOT parameter to set /fastboot when rebooting.
     15
    1162011-07-14  Bruce Dubbs <bdubbs@linuxfromscratch.org>
    217   * Major rewrite of all LFS scripts
  • bootscripts/Makefile

    r103bbd6 rf874424  
    11ETCDIR=/etc
    22EXTDIR=${DESTDIR}${ETCDIR}
    3 LIBDIR=${DESTDIR}/lib/boot
     3LIBDIR=${DESTDIR}/lib/services
     4MAN8=/usr/share/man/man8
    45MODE=754
    56DIRMODE=755
    67CONFMODE=644
    78
    8 all: install
     9all: links
     10
     11install: all
    912
    1013create-dirs:
    11         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc0.d
    12         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc1.d
    13         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc2.d
    14         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc3.d
    15         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc4.d
    16         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc5.d
    17         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rc6.d
    18         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/rcsysinit.d
    19         install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
    20         install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
    21         install -d -m ${DIRMODE} ${LIBDIR}
     14        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc0.d
     15        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc1.d
     16        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc2.d
     17        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc3.d
     18        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc4.d
     19        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc5.d
     20        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rc6.d
     21        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rcS.d
     22        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/init.d
     23        install -d -m ${DIRMODE}  ${EXTDIR}/sysconfig
     24        install -d -m ${DIRMODE}  ${LIBDIR}
     25        ln -svf       services    ${DESTDIR}/lib/lsb
     26        ln -sf        rc.d/init.d ${EXTDIR}/init.d
    2227
    23 install: create-dirs
     28files: create-dirs
    2429        install -m ${MODE} lfs/init.d/checkfs       ${EXTDIR}/rc.d/init.d/
    2530        install -m ${MODE} lfs/init.d/cleanfs       ${EXTDIR}/rc.d/init.d/
    26         install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
    27         install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
    2831        install -m ${MODE} lfs/init.d/halt          ${EXTDIR}/rc.d/init.d/
    2932        install -m ${MODE} lfs/init.d/console       ${EXTDIR}/rc.d/init.d/
    3033        install -m ${MODE} lfs/init.d/consolelog    ${EXTDIR}/rc.d/init.d/
     34        install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
    3135        install -m ${MODE} lfs/init.d/localnet      ${EXTDIR}/rc.d/init.d/
    3236        install -m ${MODE} lfs/init.d/modules       ${EXTDIR}/rc.d/init.d/
     
    3842        install -m ${MODE} lfs/init.d/sendsignals   ${EXTDIR}/rc.d/init.d/
    3943        install -m ${MODE} lfs/init.d/setclock      ${EXTDIR}/rc.d/init.d/
    40         install -m ${MODE} lfs/init.d/sysklogd      ${EXTDIR}/rc.d/init.d/
    4144        install -m ${MODE} lfs/init.d/swap          ${EXTDIR}/rc.d/init.d/
    4245        install -m ${MODE} lfs/init.d/sysctl        ${EXTDIR}/rc.d/init.d/
     46        install -m ${MODE} lfs/init.d/sysklogd      ${EXTDIR}/rc.d/init.d/
    4347        install -m ${MODE} lfs/init.d/template      ${EXTDIR}/rc.d/init.d/
    4448        install -m ${MODE} lfs/init.d/udev          ${EXTDIR}/rc.d/init.d/
    4549        install -m ${MODE} lfs/init.d/udev_retry    ${EXTDIR}/rc.d/init.d/
    46         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K80network
    47         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc0.d/K90sysklogd
    48         ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
    49         ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc0.d/S70mountfs
    50         ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
    51         ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc0.d/S90localnet
    52         ln -sf ../init.d/halt        ${EXTDIR}/rc.d/rc0.d/S99halt
    53         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc1.d/K80network
    54         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc1.d/K90sysklogd
    55         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc2.d/K80network
    56         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc2.d/K90sysklogd
    57         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc3.d/S10sysklogd
    58         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc3.d/S20network
    59         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc4.d/S10sysklogd
    60         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc4.d/S20network
    61         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc5.d/S10sysklogd
    62         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc5.d/S20network
    63         ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc6.d/K80network
    64         ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc6.d/K90sysklogd
    65         ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
    66         ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc6.d/S70mountfs
    67         ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
    68         ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc6.d/S90localnet
    69         ln -sf ../init.d/reboot      ${EXTDIR}/rc.d/rc6.d/S99reboot
    70         ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs
    71         ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcsysinit.d/S02consolelog
    72         ln -sf ../init.d/modules     ${EXTDIR}/rc.d/rcsysinit.d/S05modules
    73         ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcsysinit.d/S10udev
    74         ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcsysinit.d/S20swap
    75         ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
    76         ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
    77         ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
    78         ln -sf ../init.d/udev_retry  ${EXTDIR}/rc.d/rcsysinit.d/S50udev_retry
    79         ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcsysinit.d/S70console
    80         ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcsysinit.d/S80localnet
    81         ln -sf ../init.d/sysctl      ${EXTDIR}/rc.d/rcsysinit.d/S90sysctl
     50        install -m ${MODE} lfs/sbin/ifup            /sbin
     51        install -m ${MODE} lfs/sbin/ifdown          /sbin
     52        install -m ${MODE} lfs/sbin/ifup.8          ${MAN8}
     53        ln -sf ifup.8                               ${MAN8}/ifdown.8
     54        install -m ${MODE} lfs/lib/services/ipv4-static-route  ${LIBDIR}
     55        install -m ${MODE} lfs/lib/services/ipv4-static        ${LIBDIR}
     56        install -m ${CONFMODE} lfs/lib/services/init-functions ${LIBDIR}
    8257        if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \
    8358     install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\
     
    8964     install -m ${CONFMODE} lfs/sysconfig/rc          ${EXTDIR}/sysconfig/ ;\
    9065   fi
    91         install -m ${MODE} lfs/sysconfig/network-devices/ifup   /sbin
    92         install -m ${MODE} lfs/sysconfig/network-devices/ifdown /sbin
    93         install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static       ${LIBDIR}
    94         install -m ${MODE} lfs/sysconfig/network-devices/services/ipv4-static-route ${LIBDIR}
     66        if [ ! -f ${EXTDIR}/sysconfig/rc.site     ]; then \
     67     install -m ${CONFMODE} lfs/sysconfig/rc.site     ${EXTDIR}/sysconfig/ ;\
     68   fi
    9569
    96 install-consolelog: create-dirs
    97         install -m ${MODE} contrib/init.d/consolelog   ${EXTDIR}/rc.d/init.d
    98         ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcsysinit.d/S00consolelog
     70links: files rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
    9971
    100 minimal: create-dirs
    101         install -m ${MODE} lfs/init.d/checkfs       ${EXTDIR}/rc.d/init.d/
    102         install -m ${MODE} lfs/init.d/cleanfs       ${EXTDIR}/rc.d/init.d/
    103         install -m ${CONFMODE} lfs/init.d/functions ${EXTDIR}/rc.d/init.d/
    104         install -m ${CONFMODE} lfs/init.d/functions ${LIBDIR}
    105         install -m ${MODE} lfs/init.d/halt          ${EXTDIR}/rc.d/init.d/
    106         install -m ${MODE} lfs/init.d/localnet      ${EXTDIR}/rc.d/init.d/
    107         install -m ${MODE} lfs/init.d/mountfs       ${EXTDIR}/rc.d/init.d/
    108         install -m ${MODE} lfs/init.d/mountvirtfs   ${EXTDIR}/rc.d/init.d/
    109         install -m ${MODE} lfs/init.d/rc            ${EXTDIR}/rc.d/init.d/
    110         install -m ${MODE} lfs/init.d/reboot        ${EXTDIR}/rc.d/init.d/
    111         install -m ${MODE} lfs/init.d/sendsignals   ${EXTDIR}/rc.d/init.d/
    112         install -m ${MODE} lfs/init.d/setclock      ${EXTDIR}/rc.d/init.d/
    113         install -m ${MODE} lfs/init.d/swap          ${EXTDIR}/rc.d/init.d/
    114         install -m ${MODE} lfs/init.d/udev          ${EXTDIR}/rc.d/init.d/
     72rcS:
     73        ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcS.d/S00mountvirtfs
     74        ln -sf ../init.d/consolelog  ${EXTDIR}/rc.d/rcS.d/S02consolelog
     75        ln -sf ../init.d/modules     ${EXTDIR}/rc.d/rcS.d/S05modules
     76        ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rcS.d/S08localnet
     77        ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcS.d/S10udev
     78        ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcS.d/S20swap
     79        ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcS.d/S30checkfs
     80        ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcS.d/S40mountfs
     81        ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcS.d/S45cleanfs
     82        ln -sf ../init.d/udev_retry  ${EXTDIR}/rc.d/rcS.d/S50udev_retry
     83        ln -sf ../init.d/console     ${EXTDIR}/rc.d/rcS.d/S70console
     84        ln -sf ../init.d/sysctl      ${EXTDIR}/rc.d/rcS.d/S90sysctl
     85
     86rc0:
     87        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc0.d/K80network
     88        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc0.d/K90sysklogd
    11589        ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals
    11690        ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc0.d/S70mountfs
    11791        ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc0.d/S80swap
     92        ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc0.d/S90localnet
    11893        ln -sf ../init.d/halt        ${EXTDIR}/rc.d/rc0.d/S99halt
     94
     95rc1:
     96        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc1.d/K80network
     97        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc1.d/K90sysklogd
     98
     99rc2:
     100        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc2.d/K80network
     101        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc2.d/K90sysklogd
     102
     103rc3:
     104        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc3.d/S10sysklogd
     105        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc3.d/S20network
     106
     107rc4:
     108        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc4.d/S10sysklogd
     109        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc4.d/S20network
     110
     111rc5:
     112        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc5.d/S10sysklogd
     113        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc5.d/S20network
     114
     115rc6:
     116        ln -sf ../init.d/network     ${EXTDIR}/rc.d/rc6.d/K80network
     117        ln -sf ../init.d/sysklogd    ${EXTDIR}/rc.d/rc6.d/K90sysklogd
    119118        ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals
    120119        ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rc6.d/S70mountfs
    121120        ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rc6.d/S80swap
     121        ln -sf ../init.d/localnet    ${EXTDIR}/rc.d/rc6.d/S90localnet
    122122        ln -sf ../init.d/reboot      ${EXTDIR}/rc.d/rc6.d/S99reboot
    123         ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs
    124         ln -sf ../init.d/udev        ${EXTDIR}/rc.d/rcsysinit.d/S10udev
    125         ln -sf ../init.d/swap        ${EXTDIR}/rc.d/rcsysinit.d/S20swap
    126         ln -sf ../init.d/checkfs     ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs
    127         ln -sf ../init.d/mountfs     ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs
    128         ln -sf ../init.d/cleanfs     ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs
    129         if [ ! -f ${EXTDIR}/sysconfig/rc          ]; then \
    130       install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; \
    131    fi
    132123
    133 .PHONY: all create-dirs install
     124.PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6
    134125
  • bootscripts/README

    r103bbd6 rf874424  
    11Network Configuration:
    22   Script Files:
    3       /etc/rc.d/init.d/network
     3      /etc/rc.d/init.d/*
    44      /sbin/ifup
    55      /sbin/ifdown
    6       /lib/boot/*/*
     6      /lib/lsb/*
    77
    88   Configuration Files:
    99      /etc/sysconfig/ifconfig.*
    10       Note: ifconfig.* could be either a file or directory,
    11             but the filename extension must be the same name
    12             as the network interface you wish it to belong to.
    13             The files within the directory will be processed
    14             in alphanumerical order on boot, and reversed on
    15             shutdown.
    16       - IFACE: the interface that is being configured (e.g. eth0)
    17       - SERVICE: which script to run in services directory.
    18       - ONBOOT: if set to yes, this interface will be started on
    19                 bootup, and stopped on shutdown
     10      Note: ifconfig.* files will be processed
     11            in alphanumerical order on boot, and reversed on shutdown.
     12      - IFACE  : The interface that is being configured (e.g. eth0)
     13      - SERVICE: Which script to run in services directory.
     14      - ONBOOT : If set to yes, this interface will be started on bootup
    2015
    2116      /etc/sysconfig/network
    22       - HOSTNAME: Value of the system's hostname
     17      - HOSTNAME: Value of the system's hostname  (From LFS Book)
     18                  This value may also be set in /etc/sysconfig/rc.site
    2319
    2420   Additional Configuration:
    25       ipv4-static:
    26       - IP: static IP Address
    27       - GATEWAY: Specifies the IP Address of the gateway server
    28       - PREFIX: CIDR prefix of IP Address, defaults to 24 if not set
    29       - PEER: IP Address of peer (for point-to-point connections and tunnels)
    30       - BROADCAST: broadcast address
     21      SERVICE ipv4-static:
     22      - IP       : Static IP Address
     23      - GATEWAY  : Specifies the IP Address of the gateway server
     24      - PREFIX   : CIDR prefix of IP Address, defaults to 24 if not set
     25      - PEER     : IP Address of peer (for point-to-point connections and tunnels)
     26      - BROADCAST: Broadcast address
    3127
    32       ipv4-static-route:
    33       - TYPE: network (default type if not specified), default, host or
    34         unreachable
    35       - IP: IP Address of target (for network, host and unreachable)
    36       - PREFIX: CIDR prefix of target (for network, host and unreachable)
     28      SERVICE ipv4-static-route:
     29      - TYPE   : Network (default type if not specified), default, host or unreachable
     30      - IP     : IP Address of target (for network, host and unreachable)
     31      - PREFIX : CIDR prefix of target (for network, host and unreachable)
    3732      - GATEWAY: IP Address of gateway to reach target (for network and default)
    3833
    3934
    4035SetClock configuration:
    41    Script Files:
    42       /etc/rc.d/init.d/setclock
     36
     37      /etc/rc.d/init.d/cleanfs
    4338      - SKIPTMPCLEAN: skips cleaning of /tmp directory
    4439
    4540   Configuration Files:
    46       /etc/sysconfig/clock
     41      /etc/sysconfig/clock or /etc/sysconfig/rc.site
    4742      - UTC: 1 assumes hwclock is in UTC
    4843             0 assumes hwclock is in local time
  • bootscripts/lfs/init.d/checkfs

    r103bbd6 rf874424  
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
    88#               A. Luebke - luebke@users.sourceforge.net
     9#               DJ Lucas - dj@linuxfromscratch.org
    910# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1011#
     
    3839### END INIT INFO
    3940
    40 . /lib/boot/functions
     41. /lib/lsb/init-functions
    4142
    4243case "${1}" in
    4344   start)
    4445      if [ -f /fastboot ]; then
    45          boot_mesg -n "/fastboot found, will not perform" ${INFO}
    46          boot_mesg " file system checks as requested."
    47          echo_ok
     46         msg="/fastboot found, will omit "
     47         msg="${msg} file system checks as requested.\n"
     48         log_info_msg "${msg}"
    4849         exit 0
    4950      fi
    5051
    51       boot_mesg "Mounting root file system in read-only mode..."
     52      log_info_msg "Mounting root file system in read-only mode... "
    5253      mount -n -o remount,ro / >/dev/null
    53       evaluate_retval
    5454
    5555      if [ ${?} != 0 ]; then
    56          echo_failure
    57          boot_mesg -n "FAILURE:\n\nCannot check root" ${FAILURE}
    58          boot_mesg -n " filesystem because it could not be mounted"
    59          boot_mesg -n " in read-only mode.\n\nAfter you"
    60          boot_mesg -n " press Enter, this system will be"
    61          boot_mesg -n " halted and powered off."
    62          boot_mesg -n "\n\nPress enter to continue..." ${INFO}
    63          boot_mesg "" ${NORMAL}
     56         log_failure_msg2
     57         msg="\n\nCannot check root "
     58         msg="${msg}filesystem because it could not be mounted "
     59         msg="${msg}in read-only mode.\n\n"
     60         msg="${msg}After you press Enter, this system will be "
     61         msg="${msg}halted and powered off.\n\n"
     62         log_failure_msg "${msg}"
     63
     64         log_info_msg "Press Enter to continue..."
    6465         wait_for_user
    6566         /etc/rc.d/init.d/halt stop
     67      else
     68         log_success_msg2
    6669      fi
    6770
    6871      if [ -f /forcefsck ]; then
    69          boot_mesg -n "/forcefsck found, forcing file" ${INFO}
    70          boot_mesg " system checks as requested."
    71          echo_ok
     72         msg="\n/forcefsck found, forcing file"
     73         msg="${msg} system checks as requested."
     74         log_success_msg "$msg"
    7275         options="-f"
    7376      else
     
    7578      fi
    7679
    77       boot_mesg "Checking file systems..."
    78       # Note: -a option used to be -p; but this fails e.g.
    79       # on fsck.minix
     80      log_info_msg "Checking file systems..."
     81      # Note: -a option used to be -p; but this fails e.g. on fsck.minix
    8082      fsck ${options} -a -A -C -T
    8183      error_value=${?}
    8284
    8385      if [ "${error_value}" = 0 ]; then
    84          echo_ok
     86         log_success_msg2
    8587      fi
    8688
    8789      if [ "${error_value}" = 1 ]; then
    88          echo_warning
    89          boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
    90          boot_mesg -n " were found and have been corrected. "
    91          boot_mesg -n " You may want to double-check that"
    92          boot_mesg -n " everything was fixed properly."
    93          boot_mesg "" ${NORMAL}
     90         msg="\nWARNING:\n\nFile system errors "
     91         msg="${msg}were found and have been corrected.\n"
     92         msg="${msg}You may want to double-check that "
     93         msg="${msg}everything was fixed properly."
     94         log_warning_msg "$msg"
    9495      fi
    9596
    9697      if [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then
    97          echo_warning
    98          boot_mesg -n "WARNING:\n\nFile system errors" ${WARNING}
    99          boot_mesg -n " were found and have been been"
    100          boot_mesg -n " corrected, but the nature of the"
    101          boot_mesg -n " errors require this system to be"
    102          boot_mesg -n " rebooted.\n\nAfter you press enter,"
    103          boot_mesg -n " this system will be rebooted"
    104          boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
    105          boot_mesg "" ${NORMAL}
     98         msg="\nWARNING:\n\nFile system errors "
     99         msg="${msg}were found and have been been "
     100         msg="${msg}corrected, but the nature of the "
     101         msg="${msg}errors require this system to be rebooted.\n\n"
     102         msg="${msg}After you press enter, "
     103         msg="${msg}this system will be rebooted\n\n"
     104         log_failure_msg "$msg"
     105
     106         log_info_msg "Press Enter to continue..."
    106107         wait_for_user
    107108         reboot -f
     
    109110
    110111      if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
    111          echo_failure
    112          boot_mesg -n "FAILURE:\n\nFile system errors" ${FAILURE}
    113          boot_mesg -n " were encountered that could not be"
    114          boot_mesg -n " fixed automatically.  This system"
    115          boot_mesg -n " cannot continue to boot and will"
    116          boot_mesg -n " therefore be halted until those"
    117          boot_mesg -n " errors are fixed manually by a"
    118          boot_mesg -n " System Administrator.\n\nAfter you"
    119          boot_mesg -n " press Enter, this system will be"
    120          boot_mesg -n " halted and powered off."
    121          boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
    122          boot_mesg "" ${NORMAL}
     112         msg="\nFAILURE:\n\nFile system errors "
     113         msg="${msg}were encountered that could not be "
     114         msg="${msg}fixed automatically.  This system "
     115         msg="${msg}cannot continue to boot and will "
     116         msg="${msg}therefore be halted until those "
     117         msg="${msg}errors are fixed manually by a "
     118         msg="${msg}System Administrator.\n\n"
     119         msg="${msg}After you press Enter, this system will be "
     120         msg="${msg}halted and powered off.\n\n"
     121         log_failure_msg "$msg"
     122
     123         log_info_msg "Press Enter to continue..."
    123124         wait_for_user
    124         /etc/rc.d/init.d/halt stop
     125         /etc/rc.d/init.d/halt stop
    125126      fi
    126127
    127128      if [ "${error_value}" -ge 16 ]; then
    128          echo_failure
    129          boot_mesg -n "FAILURE:\n\nUnexpected Failure" ${FAILURE}
    130          boot_mesg -n " running fsck.  Exited with error"
    131          boot_mesg -n " code: ${error_value}."
    132          boot_mesg "" ${NORMAL}
     129         msg="\nFAILURE:\n\nUnexpected Failure "
     130         msg="${msg}running fsck.  Exited with error "
     131         msg="${msg} code: ${error_value}."
     132         log_failure_msg $msg
    133133         exit ${error_value}
    134134      fi
     135
     136      exit 0
    135137      ;;
    136138   *)
  • bootscripts/lfs/init.d/cleanfs

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2728### END INIT INFO
    2829
    29 . /lib/boot/functions
     30. /lib/lsb/init-functions
    3031
    3132# Function to create files/directory on boot.
    32 create_files() {
    33    # Read in the configuration file.
     33function create_files()
     34{
     35   # Input to file descriptor 9 and output to stdin (redirection)
    3436   exec 9>&0 < /etc/sysconfig/createfiles
    35       while read name type perm usr grp dtype maj min junk
    36       do
    37          # Ignore comments and blank lines.
    38                case "${name}" in
    39             ""|\#*) continue ;;
     37
     38   while read name type perm usr grp dtype maj min junk
     39   do
     40      # Ignore comments and blank lines.
     41      case "${name}" in
     42         ""|\#*) continue ;;
     43      esac
     44
     45      # Ignore existing files.
     46      if [ ! -e "${name}" ]; then
     47         # Create stuff based on its type.
     48         case "${type}" in
     49            dir)
     50               mkdir "${name}"
     51               ;;
     52            file)
     53               :> "${name}"
     54               ;;
     55            dev)
     56               case "${dtype}" in
     57                  char)
     58                     mknod "${name}" c ${maj} ${min}
     59                     ;;
     60                  block)
     61                     mknod "${name}" b ${maj} ${min}
     62                     ;;
     63                  pipe)
     64                     mknod "${name}" p
     65                     ;;
     66                  *)
     67                     log_warning_msg "\nUnknown device type: ${dtype}"
     68                     ;;
     69               esac
     70               ;;
     71            *)
     72               log_warning_msg "\nUnknown type: ${type}"
     73               continue
     74               ;;
    4075         esac
    4176
    42          # Ignore existing files.
    43          if [ ! -e "${name}" ]; then
    44             # Create stuff based on its type.
    45             case "${type}" in
    46                dir)
    47                   mkdir "${name}"
    48                   ;;
    49                file)
    50                   :> "${name}"
    51                   ;;
    52                dev)
    53                   case "${dtype}" in
    54                      char)
    55                         mknod "${name}" c ${maj} ${min}
    56                         ;;
    57                      block)
    58                         mknod "${name}" b ${maj} ${min}
    59                         ;;
    60                      pipe)
    61                         mknod "${name}" p
    62                         ;;
    63                      *)
    64                         boot_mesg -n "\nUnknown device type: ${dtype}" ${WARNING}
    65                         boot_mesg "" ${NORMAL}
    66                         ;;
    67                   esac
    68                   ;;
    69                *)
    70                   boot_mesg -n "\nUnknown type: ${type}" ${WARNING}
    71                   boot_mesg "" ${NORMAL}
    72                   continue
    73                   ;;
    74             esac
     77         # Set up the permissions, too.
     78         chown ${usr}:${grp} "${name}"
     79         chmod ${perm} "${name}"
     80      fi
     81   done
    7582
    76             # Set up the permissions, too.
    77             chown ${usr}:${grp} "${name}"
    78             chmod ${perm} "${name}"
    79          fi
    80       done
     83   # Close file descriptor 9 (end redirection)
    8184   exec 0>&9 9>&-
     85   return 0
    8286}
    8387
    8488case "${1}" in
    8589   start)
    86       boot_mesg -n "Cleaning file systems:" ${INFO}
     90      log_info_msg "Cleaning file systems:"
    8791
    8892      if [ "${SKIPTMPCLEAN}" = "" ]; then
    89          boot_mesg -n " /tmp" ${NORMAL}
     93         log_info_msg2 "\n /tmp"
    9094         cd /tmp &&
    9195         find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1
     
    103107
    104108      if egrep -qv '^(#|$)' /etc/sysconfig/createfiles 2>/dev/null; then
    105          boot_mesg "Creating files and directories..."
    106          create_files
     109         log_info_msg "Creating files and directories... "
     110         create_files      # Always returns 0
    107111         evaluate_retval
    108112      fi
     113
     114      exit $failed
    109115      ;;
    110116   *)
  • bootscripts/lfs/init.d/console

    r103bbd6 rf874424  
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
    88#               Alexander E. Patrakov
     9#               DJ Lucas - dj@linuxfromscratch.org
    910# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1011#
     
    1213#
    1314########################################################################
    14 
    15 . /lib/boot/functions
    1615
    1716### BEGIN INIT INFO
     
    2928### END INIT INFO
    3029
     30. /lib/lsb/init-functions
     31
    3132# Native English speakers probably don't have /etc/sysconfig/console at all
    32 if [ -r /etc/sysconfig/console ]; then
    33    . /etc/sysconfig/console
    34 else
     33[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
     34
     35function is_true()
     36{
     37   [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
     38}
     39
     40# See if we need to do anything
     41if [ -z "${KEYMAP}"         ] && [ -z "${KEYMAP_CORRECTIONS}" ] &&
     42   [ -z "${FONT}"           ] && [ is_true "${UNICODE}"       ] &&
     43   [ -z "${LEGACY_CHARSET}" ]; then
    3544   exit 0
    3645fi
    37 
    38 is_true() {
    39    [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]
    40 }
    4146
    4247failed=0
     
    4449case "${1}" in
    4550   start)
    46       boot_mesg "Setting up Linux console..."
    4751      # There should be no bogus failures below this line!
     52      log_info_msg "Setting up Linux console..."
    4853
    4954      # Figure out if a framebuffer console is used
    50       [ -d /sys/class/graphics/fb0 ] && USE_FB=1 || USE_FB=0
     55      [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0
    5156
    5257      # Figure out the command to set the console into the
    5358      # desired mode
    5459      is_true "${UNICODE}" &&
    55          MODE_COMMAND="${ECHO} -en '\033%G' && kbd_mode -u" ||
    56          MODE_COMMAND="${ECHO} -en '\033%@\033(K' && kbd_mode -a"
     60         MODE_COMMAND="echo -en '\033%G' && kbd_mode -u" ||
     61         MODE_COMMAND="echo -en '\033%@\033(K' && kbd_mode -a"
    5762
    5863      # On framebuffer consoles, font has to be set for each vt in
    5964      # UTF-8 mode. This doesn't hurt in non-UTF-8 mode also.
    6065
    61       ! is_true "${USE_FB}" || [ -z "${FONT}" ] ||
     66      ! is_true "${use_fb}" || [ -z "${FONT}" ] ||
    6267         MODE_COMMAND="${MODE_COMMAND} && setfont ${FONT}"
    6368
     
    6772      # show up and the unicode map of the font will not be
    6873      # used.
    69       # FIXME: Fedora Core also initializes two spare consoles
    70       # - do we want that?
    7174
    7275      for TTY in `grep '^[^#].*respawn:/sbin/agetty' /etc/inittab |
     
    7881
    7982      # Set the font (if not already set above) and the keymap
    80       is_true "${USE_FB}" || [ -z "${FONT}" ] ||
    81          setfont $FONT ||
    82          failed=1
     83      [ "${use_fb}" == "1" || [ -z "${FONT}" ] || setfont $FONT || failed=1
     84
    8385      [ -z "${KEYMAP}" ] ||
    8486         loadkeys ${KEYMAP} >/dev/null 2>&1 ||
    8587         failed=1
     88     
    8689      [ -z "${KEYMAP_CORRECTIONS}" ] ||
    8790         loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 ||
     
    9093      # Convert the keymap from $LEGACY_CHARSET to UTF-8
    9194      [ -z "$LEGACY_CHARSET" ] ||
    92          dumpkeys -c "$LEGACY_CHARSET" |
    93          loadkeys -u >/dev/null 2>&1 ||
     95         dumpkeys -c "$LEGACY_CHARSET" | loadkeys -u >/dev/null 2>&1 ||
    9496         failed=1
    9597
    9698      # If any of the commands above failed, the trap at the
    9799      # top would set $failed to 1
    98       ( exit $failed )
     100      ( exit $failed ) 
    99101      evaluate_retval
    100       ;;
    101    *)
    102       echo $"Usage:" "${0} {start}"
    103       exit 1
    104       ;;
     102
     103      exit $failed
     104      ;;             
     105
     106   *)                 
     107      echo $"Usage:"  "${0} {start}"
     108      exit 1         
     109      ;;             
    105110esac
    106111
  • bootscripts/lfs/init.d/consolelog

    r103bbd6 rf874424  
    66#
    77# Authors     : Dan Nicholson - dnicholson@linuxfromscratch.org
    8 # Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
     8#               Gerard Beekmans  - gerard@linuxfromscratch.org
     9#               DJ Lucas - dj@linuxfromscratch.org
    910# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1011#
     
    2829### END INIT INFO
    2930
    30 . /lib/boot/functions
     31. /lib/lsb/init-functions
    3132
    32 # set the default loglevel
    33 LOGLEVEL=7
     33# set the default loglevel if needed
     34LOGLEVEL=${LOGLEVEL:-7}
    3435
    35 [ -r /etc/sysconfig/console ] &&  . /etc/sysconfig/console
     36[ -r /etc/sysconfig/console ] && . /etc/sysconfig/console
    3637
    3738case "${1}" in
     
    3940      case "$LOGLEVEL" in
    4041      [1-8])
    41          boot_mesg "Setting the console log level to ${LOGLEVEL}..."
     42         log_info_msg "Setting the console log level to ${LOGLEVEL}..."
    4243         dmesg -n $LOGLEVEL
    4344         evaluate_retval
     45         exit 0
    4446         ;;
     47
    4548      *)
    46          boot_mesg "Console log level '${LOGLEVEL}' is invalid" ${FAILURE}
    47          echo_failure
     49         log_failure_msg "Console log level '${LOGLEVEL}' is invalid"
     50         exit 1
    4851         ;;
     52     
    4953      esac
    5054      ;;
     
    5559         read level line < /proc/sys/kernel/printk
    5660      else
    57          boot_mesg "Can't read the current console log level" ${FAILURE}
    58          echo_failure
     61         log_failure_msg "Can't read the current console log level"
     62         exit 1
    5963      fi
    6064
    6165      # Print the value
    6266      if [ -n "$level" ]; then
    63          ${ECHO} -e "${INFO}The current console log level is ${level}${NORMAL}"
     67         log_info_msg "The current console log level is ${level}\n"
     68         exit 0
    6469      fi
    6570      ;;
  • bootscripts/lfs/init.d/functions

    r103bbd6 rf874424  
    1313#               http://winterdrache.de/linux/newboot/index.html
    1414#
    15 #               The file should be located in /lib/boot
     15#               This file is only present for backward BLFS compatibility
    1616#
    1717########################################################################
    1818
    1919# Set any needed environment variables e.g. HEADLESS
    20 [ -r /etc/sysconfig/init_params ]  && . /etc/sysconfig/init_params
     20. /lib/lsb/init_params
    2121
    2222## Environmental setup
  • bootscripts/lfs/init.d/halt

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
  • bootscripts/lfs/init.d/localnet

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2627### END INIT INFO
    2728
    28 . /lib/boot/functions
    29 . /etc/sysconfig/network
     29. /lib/lsb/init-functions
     30[ -r /etc/sysconfig/network ] && . /etc/sysconfig/network
    3031
    3132case "${1}" in
    3233   start)
    33       boot_mesg "Bringing up the loopback interface..."
     34      log_info_msg "Bringing up the loopback interface..."
    3435      ip addr add 127.0.0.1/8 label lo dev lo
    3536      ip link set lo up
    3637      evaluate_retval
    3738
    38       boot_mesg "Setting hostname to ${HOSTNAME}..."
     39      log_info_msg "Setting hostname to ${HOSTNAME}..."
    3940      hostname ${HOSTNAME}
    4041      evaluate_retval
     
    4243
    4344   stop)
    44       boot_mesg "Bringing down the loopback interface..."
     45      log_info_msg "Bringing down the loopback interface..."
    4546      ip link set lo down
    4647      evaluate_retval
     
    6465esac
    6566
     67exit 0
     68
    6669# End localnet
  • bootscripts/lfs/init.d/modules

    r103bbd6 rf874424  
    66#
    77# Authors     : Zack Winkles
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2526### END INIT INFO
    2627
    27 . /lib/boot/functions
    28 
    2928# Assure that the kernel has module support.
    3029[ -e /proc/ksyms -o -e /proc/modules ] || exit 0
     30
     31. /lib/lsb/init-functions
    3132
    3233case "${1}" in
     
    3435      # Exit if there's no modules file or there are no
    3536      # valid entries
    36       [ -r /etc/sysconfig/modules ] &&
    37          egrep -qv '^($|#)' /etc/sysconfig/modules ||
    38          exit 0
     37      [ -r /etc/sysconfig/modules ]                    || exit 0
     38      [ $(egrep -qv '^($|#)' /etc/sysconfig/modules) ] || exit 0
    3939
    40       boot_mesg -n "Loading modules:" ${INFO}
     40      log_info_msg "Loading modules:"
    4141
    4242      # Only try to load modules if the user has actually given us
    4343      # some modules to load.
     44
    4445      while read module args; do
    4546
     
    4950         esac
    5051
    51          # Attempt to load the module, making
    52          # sure to pass any arguments provided.
     52         # Attempt to load the module, passing any arguments provided.
    5353         modprobe ${module} ${args} >/dev/null
    5454
    55          # Print the module name if successful,
    56          # otherwise take note.
     55         # Print the module name if successful, otherwise take note.
    5756         if [ $? -eq 0 ]; then
    58             boot_mesg -n " ${module}" ${NORMAL}
     57            log_info_msg2 " ${module}"
    5958         else
    6059            failedmod="${failedmod} ${module}"
     
    6261      done < /etc/sysconfig/modules
    6362
    64       boot_mesg "" ${NORMAL}
    65       # Print a message about successfully loaded
    66       # modules on the correct line.
    67       echo_ok
     63      # Print a message about successfully loaded modules on the correct line.
     64      log_success_msg2
    6865
    69       # Print a failure message with a list of any
    70       # modules that may have failed to load.
     66      # Print a failure message with a list of any modules that
     67      # may have failed to load.
    7168      if [ -n "${failedmod}" ]; then
    72          boot_mesg "Failed to load modules:${failedmod}" ${FAILURE}
    73          echo_failure
     69         log_failure_msg "Failed to load modules:${failedmod}"
     70         exit 1
    7471      fi
    7572      ;;
     
    8178esac
    8279
     80exit 0
     81
    8382# End modules
  • bootscripts/lfs/init.d/mountfs

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2829### END INIT INFO
    2930
    30 . /lib/boot/functions
     31. /lib/lsb/init-functions
    3132
    3233case "${1}" in
    3334   start)
    34       boot_mesg "Remounting root file system in read-write mode..."
     35      log_info_msg "Remounting root file system in read-write mode..."
    3536      mount -n -o remount,rw / >/dev/null
    3637      evaluate_retval
     
    3940      rm -f /fastboot /forcefsck
    4041
    41       boot_mesg "Recording existing mounts in /etc/mtab..."
     42      log_info_msg "Recording existing mounts in /etc/mtab..."
    4243      > /etc/mtab
    4344
     
    5152      # This will mount all filesystems that do not have _netdev in
    5253      # their option list.  _netdev denotes a network filesystem.
    53       boot_mesg "Mounting remaining file systems..."
     54
     55      log_info_msg "Mounting remaining file systems..."
    5456      mount -a -O no_netdev >/dev/null
    5557      evaluate_retval
     58      exit $failed
    5659      ;;
    5760
    5861   stop)
    59       boot_mesg "Unmounting all other currently mounted file systems..."
     62      # Don't unmount tmpfs like /run
     63      log_info_msg "Unmounting all other currently mounted file systems..."
    6064      umount -a -d -r -t notmpfs >/dev/null
    6165      evaluate_retval
     66      exit 0
    6267      ;;
    6368
  • bootscripts/lfs/init.d/mountvirtfs

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2728### END INIT INFO
    2829
    29 . /lib/boot/functions
     30. /lib/lsb/init-functions
    3031
    3132case "${1}" in
    3233   start)
     34      # Make sure /run/var is available before logging any messages
    3335      mkdir -p /run
    3436      mount -n /run || failed=1
    3537      mkdir -p /run/{var,lock,shm}
    3638
    37 
    38       boot_mesg -n "Mounting virtual file systems:" ${INFO}
    39       boot_mesg -n " /run" ${NORMAL}
     39      log_info_msg "Mounting virtual file systems: /run"
    4040
    4141      if ! mountpoint /proc >/dev/null; then
    42          boot_mesg -n " /proc" ${NORMAL}
     42         log_info_msg2 " /proc"
    4343         mount -n /proc || failed=1
    4444      fi
    4545
    4646      if ! mountpoint /sys >/dev/null; then
    47          boot_mesg -n " /sys" ${NORMAL}
     47         log_info_msg2 " /sys"
    4848         mount -n /sys || failed=1
    4949      fi
    5050
    51       boot_mesg "" ${NORMAL}
    52 
    5351      (exit ${failed})
    5452      evaluate_retval
     53      exit $failed
    5554      ;;
    5655
     
    6160esac
    6261
    63 # End mountvertfs
     62# End mountvirtfs
  • bootscripts/lfs/init.d/network

    r103bbd6 rf874424  
    88#               Nathan Coulson - nathan@linuxfromscratch.org
    99#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
     10#               DJ Lucas - dj@linuxfromscratch.org
    1011# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1112#
     
    3435         interface=${file##*/ifconfig.}
    3536
    36          # skip if $file is * (because nothing was found)
     37         # Skip if $file is * (because nothing was found)
    3738         if [ "${interface}" = "*" ]
    3839         then
     
    4647   stop)
    4748      # Reverse list
    48       FILES=""
     49      net_files=""
    4950      for file in  /etc/sysconfig/ifconfig.*
    5051      do
    51          FILES="${file} ${FILES}"
     52         net_files="${file} ${net_files}"
    5253      done
    5354
    5455      # Stop all network interfaces
    55       for file in ${FILES}
     56      for file in ${net_files}
    5657      do
    5758         interface=${file##*/ifconfig.}
    5859
    59          # skip if $file is * (because nothing was found)
     60         # Skip if $file is * (because nothing was found)
    6061         if [ "${interface}" = "*" ]
    6162         then
     
    7980esac
    8081
     82exit 0
     83
    8184# End network
  • bootscripts/lfs/init.d/rc

    r103bbd6 rf874424  
    1 #!/bin/sh
     1#!/bin/bash
    22########################################################################
    33# Begin rc
     
    66#
    77# Authors     : Gerard Beekmans  - gerard@linuxfromscratch.org
     8#             : DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    1213########################################################################
    1314
    14 . /lib/boot/functions
     15. /lib/lsb/init-functions
    1516
    16 print_error_msg()
     17function print_error_msg()
    1718{
    18    echo_failure
     19   log_failure_msg
    1920   # $i is set when called
    20    boot_mesg -n "FAILURE:\n\nYou should not be reading this error message.\n\n" ${FAILURE}
    21    boot_mesg -n " It means that an unforeseen error took"
    22    boot_mesg -n " place in ${i}, which exited with a return value of"
    23    boot_mesg " ${error_value}.\n"
    24    boot_mesg_flush
    25    boot_mesg -n "If you're able to track this"
    26    boot_mesg -n " error down to a bug in one of the files provided by"
    27    boot_mesg -n " the LFS book, please be so kind to inform us at"
    28    boot_mesg " lfs-dev@linuxfromscratch.org.\n"
    29    boot_mesg_flush
    30    boot_mesg -n "Press Enter to continue..." ${INFO}
    31    boot_mesg "" ${NORMAL}
     21   MSG="FAILURE:\n\nYou should not be reading this error message.\n\n"
     22   MSG="${MSG}It means that an unforeseen error took place in\n"
     23   MSG="${MSG}${i},\n"
     24   MSG="${MSG}which exited with a return value of ${error_value}.\n"
     25 
     26   MSG="${MSG}If you're able to track this error down to a bug in one of\n"
     27   MSG="${MSG}the files provided by the files provided by\n"
     28   MSG="${MSG}the ${DISDRI_MINI} book, please be so kind to inform us at\n"
     29   MSG="${MSG}${DISTRO_CONTACT}.\n"
     30   log_failure_msg "${MSG}"
     31
     32   log_info_msg "Press Enter to continue..."
    3233   wait_for_user
    3334}
    3435
    35 check_script_status()
     36function check_script_status()
    3637{
    3738   # $i is set when called
    3839   if [ ! -f ${i} ]; then
    39       boot_mesg "${i} is not a valid symlink." ${WARNING}
    40       echo_warning
     40      log_warning_msg "${i} is not a valid symlink."
    4141      continue
    4242   fi
    4343
    4444   if [ ! -x ${i} ]; then
    45       boot_mesg "${i} is not executable, skipping." ${WARNING}
    46       echo_warning
     45      log_warning_msg "${i} is not executable, skipping."
    4746      continue
    4847   fi
    4948}
    5049
    51 # This sets a few default terminal options.
    52 stty sane
     50function run()
     51{
     52   if [ -z $interactive ]; then
     53      ${1} ${2}
     54      return $?
     55   fi
     56
     57   while true; do
     58      read -p "Run ${1} ${2} (Yes/no/continue)? " -n 1 runit
     59      echo
     60
     61      case ${runit} in
     62         c | C)
     63            interactive=""
     64            ${i} ${2}
     65            ret=${?}
     66            break;
     67            ;;
     68
     69         n | N)
     70            return 0
     71            ;;
     72
     73         y | Y)
     74            ${i} ${2}
     75            ret=${?}
     76            break
     77            ;;
     78      esac
     79   done
     80
     81   return $ret
     82}
     83
     84# Read any local settings/overrides
     85[ -r /etc/sysconfig/rc.site ] && source /etc/sysconfig/rc.site
     86
     87DISTRO=${DISTRO:-"Linux From Scratch"}
     88DISTRO_CONTACT=${DISTRO_CONTACT:-"lfs-dev@linuxfromscratch.org (Registration required)"}
     89DISTRO_MINI=${DISTRO_MINI:-"LFS"}
    5390
    5491# These 3 signals will not cause our script to exit
     
    66103
    67104if [ ! -d /etc/rc.d/rc${runlevel}.d ]; then
    68    boot_mesg "/etc/rc.d/rc${runlevel}.d does not exist."
     105   log_info_msg "/etc/rc.d/rc${runlevel}.d does not exist.\n"
    69106   exit 1
     107fi
     108
     109if [ "$runlevel" == "6" ] || [ "$runlevel" == "0" ]; then IPROMPT="no"; fi
     110
     111if [ "${IPROMPT}" == "yes" ]; then
     112   # dcol and icol are spaces before the message to center the
     113   # message on screen.
     114
     115   wcol=$(( ( ${COLUMNS} - ${wlen} ) / 2 ))
     116   icol=$(( ( ${COLUMNS} - ${ilen} ) / 2 ))
     117
     118   echo -e "\\033[${wcol}G${welcome_message}"
     119   echo -e "\\033[${icol}G${i_message}${NORMAL}"
     120   echo ""
     121   read -t "${itime}" -n 1 interactive 2>&1 > /dev/null
     122
     123   # Make lower case
     124   [ "${interactive}" == "I" ] && interactive="i"
     125   [ "${interactive}" != "i" ] && interactive=""
    70126fi
    71127
     
    79135      suffix=${i#/etc/rc.d/rc$runlevel.d/K[0-9][0-9]}
    80136      prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix
    81       sysinit_start=/etc/rc.d/rcsysinit.d/S[0-9][0-9]$suffix
     137      sysinit_start=/etc/rc.d/rcS.d/S[0-9][0-9]$suffix
    82138
    83       if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then
     139      if [ "${runlevel}" != "0" ]  && [ "${runlevel}" != "6" ]; then
    84140         if [ ! -f ${prev_start} ] && [ ! -f ${sysinit_start} ]; then
    85             boot_mesg -n "WARNING:\n\n${i} can't be" ${WARNING}
    86             boot_mesg -n " executed because it was not"
    87             boot_mesg -n " not started in the previous"
    88             boot_mesg -n " runlevel (${previous})."
    89             boot_mesg "" ${NORMAL}
    90             boot_mesg_flush
     141            MSG="WARNING:\n\n${i} can't be "
     142            MSG="${MSG}executed because it was not "
     143            MSG="${MSG}not started in the previous "
     144            MSG="${MSG}runlevel (${previous})."
     145            log_warning_msg "$MSG"
    91146            continue
    92147         fi
    93148      fi
    94       ${i} stop
     149
     150      run ${i} stop
    95151      error_value=${?}
    96152
    97       if [ "${error_value}" != "0" ]; then
    98          print_error_msg
    99       fi
     153      if [ "${error_value}" != "0" ]; then print_error_msg; fi
    100154   done
    101155fi
    102156
    103 if [ "${previous}" = "N" ]; then
    104    IN_BOOT=1
    105    export IN_BOOT
     157if [ "${previous}" == "N" ]; then export IN_BOOT=1; fi
     158
     159if [ "$runlevel" == "6" ] && [ -n ${FASTBOOT} ]; then
     160   touch /fastboot
    106161fi
    107162
    108 #Start all functions in this runlevel
     163
     164# Start all functions in this runlevel
    109165for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null)
    110166do
     
    121177   case ${runlevel} in
    122178      0|6)
    123          ${i} stop
     179         run ${i} stop
    124180         ;;
    125181      *)
    126          ${i} start
     182         run ${i} start
    127183         ;;
    128184   esac
     185
    129186   error_value=${?}
    130187
    131    if [ "${error_value}" != "0" ]; then
    132       print_error_msg
    133    fi
     188   if [ "${error_value}" != "0" ]; then print_error_msg; fi
    134189done
    135190
     191# Copy the boot log on initial boot only
     192if [ "${previous}" == "N" ]; then
     193   cat /run/var/bootlog >> /var/log/boot.log
     194   echo "--------" >> /var/log/boot.log  # Mark the end of boot
     195fi
     196
    136197# End rc
  • bootscripts/lfs/init.d/reboot

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2526### END INIT INFO
    2627
    27 . /lib/boot/functions
     28. /lib/lsb/init-functions
    2829
    2930case "${1}" in
    3031   stop)
    31       boot_mesg "Restarting system..."
     32      log_info_msg "Restarting system..."
    3233      reboot -d -f -i
    3334      ;;
  • bootscripts/lfs/init.d/sendsignals

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2526### END INIT INFO
    2627
    27 . /lib/boot//functions
     28. /lib/lsb/init-functions
    2829
    2930case "${1}" in
    3031   stop)
    31       boot_mesg "Sending all processes the TERM signal..."
     32      log_info_msg "Sending all processes the TERM signal..."
    3233      killall5 -15
    3334      error_value=${?}
     
    3637
    3738      if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
    38          echo_ok
     39         log_success_msg
    3940      else
    40          echo_failure
     41         log_failure_msg
    4142      fi
    4243
    43       boot_mesg "Sending all processes the KILL signal..."
     44      log_info_msg "Sending all processes the KILL signal..."
    4445      killall5 -9
    4546      error_value=${?}
     
    4849
    4950      if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then
    50          echo_ok
     51         log_success_msg
    5152      else
    52          echo_failure
     53         log_failure_msg
    5354      fi
    5455      ;;
     
    6162esac
    6263
     64exit 0
     65
    6366# End sendsignals
  • bootscripts/lfs/init.d/setclock

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2627### END INIT INFO
    2728
    28 . /lib/boot/functions
     29. /lib/lsb/init-functions
    2930
    30 [ -r /etc/sysconfig/clock ] &&  . /etc/sysconfig/clock
     31[ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock
    3132
    3233
     
    4445case ${1} in
    4546   start)
    46       boot_mesg "Setting system clock..."
     47      log_info_msg2 "\n" # Run by udev, make sure start on new line
     48      log_info_msg "Setting system clock..."
    4749      hwclock --hctosys ${CLOCKPARAMS} >/dev/null
    4850      evaluate_retval
     
    5052
    5153   stop)
    52       boot_mesg "Setting hardware clock..."
     54      log_info_msg "Setting hardware clock..."
    5355      hwclock --systohc ${CLOCKPARAMS} >/dev/null
    5456      evaluate_retval
     
    5759   *)
    5860      echo "Usage: ${0} {start|stop}"
     61      exit 1
    5962      ;;
    6063
    6164esac
     65
     66exit 0
  • bootscripts/lfs/init.d/swap

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2627### END INIT INFO
    2728
    28 . /lib/boot/functions
     29. /lib/lsb/init-functions
    2930
    3031case "${1}" in
    3132   start)
    32       boot_mesg "Activating all swap files/partitions..."
     33      log_info_msg "Activating all swap files/partitions..."
    3334      swapon -a
    3435      evaluate_retval
     
    3637
    3738   stop)
    38       boot_mesg "Deactivating all swap files/partitions..."
     39      log_info_msg "Deactivating all swap files/partitions..."
    3940      swapoff -a
    4041      evaluate_retval
     
    4849
    4950   status)
    50       boot_mesg "Retrieving swap status." ${INFO}
    51       echo_ok
    52       echo
     51      log_success_msg "Retrieving swap status."
    5352      swapon -s
    5453      ;;
     
    6059esac
    6160
     61exit 0
     62
    6263# End swap
  • bootscripts/lfs/init.d/sysctl

    r103bbd6 rf874424  
    88# Authors     : Nathan Coulson (nathan@linuxfromscratch.org)
    99#               Matthew Burgress (matthew@linuxfromscratch.org)
     10#               DJ Lucas - dj@linuxfromscratch.org
    1011# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1112#
     
    2829### END INIT INFO
    2930
    30 . /lib/boot/functions
     31. /lib/lsb/init-functions
    3132
    3233case "${1}" in
    3334   start)
    3435      if [ -f "/etc/sysctl.conf" ]; then
    35          boot_mesg "Setting kernel runtime parameters..."
     36         log_info_msg "Setting kernel runtime parameters..."
    3637         sysctl -q -p
    3738         evaluate_retval
     
    4950esac
    5051
     52exit 0
     53
    5154# End sysctl
  • bootscripts/lfs/init.d/sysklogd

    r103bbd6 rf874424  
    66#
    77# Authors     : Gerard Beekmans - gerard@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2627### END INIT INFO
    2728
    28 . /lib/boot/functions
     29. /lib/lsb/init-functions
    2930
    3031case "${1}" in
    3132   start)
    32       boot_mesg "Starting system log daemon..."
    33       PARMS=${SYSKLOGD_PARMS-'-m 0'}
    34       loadproc syslogd $PARMS
     33      log_info_msg "Starting system log daemon..."
     34      parms=${SYSKLOGD_PARMS-'-m 0'}
     35      start_daemon /sbin/syslogd $parms
     36      evaluate_retval
    3537
    36       boot_mesg "Starting kernel log daemon..."
    37       loadproc klogd
     38      log_info_msg "Starting kernel log daemon..."
     39      start_daemon /sbin/klogd
     40      evaluate_retval
    3841      ;;
    3942
    4043   stop)
    41       boot_mesg "Stopping kernel log daemon..."
    42       killproc klogd
     44      log_info_msg "Stopping kernel log daemon..."
     45      killproc /sbin/klogd
     46      evaluate_retval
    4347
    44       boot_mesg "Stopping system log daemon..."
    45       killproc syslogd
     48      log_info_msg "Stopping system log daemon..."
     49      killproc /sbin/syslogd
     50      evaluate_retval
    4651      ;;
    4752
    4853   reload)
    49       boot_mesg "Reloading system log daemon config file..."
    50       reloadproc syslogd
     54      log_info_msg "Reloading system log daemon config file..."
     55      pid=`pidofproc syslogd`
     56      kill -HUP "${pid}"
     57      evaluate_retval
    5158      ;;
    5259
     
    5764      ;;
    5865
    59    status)
    60       statusproc syslogd
    61       statusproc klogd
    62       ;;
    63 
    6466   *)
    65       echo "Usage: ${0} {start|stop|reload|restart|status}"
     67      echo "Usage: ${0} {start|stop|reload|restart}"
    6668      exit 1
    6769      ;;
    6870esac
    6971
     72exit 0
     73
    7074# End sysklogd
  • bootscripts/lfs/init.d/template

    r103bbd6 rf874424  
    2626### END INIT INFO
    2727
    28 . /lib/boot/functions
     28. /lib/lsb/init-functions
    2929
    3030case "${1}" in
    3131   start)
    32       boot_mesg "Starting..."
    33       loadproc
     32      log_info_msg "Starting..."
     33      start_daemon fully_qualified_path
    3434      ;;
    3535
    3636   stop)
    37       boot_mesg "Stopping..."
    38       killproc
    39       ;;
    40 
    41    reload)
    42       boot_mesg "Reloading..."
    43       reloadproc
     37      log_info_msg "Stopping..."
     38      killproc fully_qualified_path
    4439      ;;
    4540
     
    5045      ;;
    5146
    52    status)
    53       statusproc
    54       ;;
    55 
    5647   *)
    57       echo "Usage: ${0} {start|stop|reload|restart|status}"
     48      echo "Usage: ${0} {start|stop|restart}"
    5849      exit 1
    5950      ;;
    6051esac
    6152
     53exit 0
     54
    6255# End scriptname
  • bootscripts/lfs/init.d/udev

    r103bbd6 rf874424  
    66#
    77# Authors     : Zack Winkles, Alexander E. Patrakov
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2627### END INIT INFO
    2728
    28 . /lib/boot/functions
     29. /lib/lsb/init-functions
    2930
    3031case "${1}" in
    3132   start)
    32       boot_mesg "Populating /dev with device nodes..."
     33      log_info_msg "Populating /dev with device nodes... "
    3334      if ! grep -q '[[:space:]]sysfs' /proc/mounts; then
    34          echo_failure
    35          boot_mesg -n "FAILURE:\n\nUnable to create" ${FAILURE}
    36          boot_mesg -n " devices without a SysFS filesystem"
    37          boot_mesg -n "\n\nAfter you press Enter, this system"
    38          boot_mesg -n " will be halted and powered off."
    39          boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
    40          boot_mesg "" ${NORMAL}
     35         log_failure_msg2
     36         msg="FAILURE:\n\nUnable to create "
     37         msg="${msg}devices without a SysFS filesystem\n\n"
     38         msg="${msg}After you press Enter, this system "
     39         msg="${msg}will be halted and powered off.\n\n"
     40         log_info_msg "$msg"
     41         log_info_msg "Press Enter to continue..."
    4142         wait_for_user
    4243         /etc/rc.d/init.d/halt stop
     
    5051         mount -n -t tmpfs tmpfs /dev -o mode=755
    5152      fi
     53
    5254      if [ ${?} != 0 ]; then
    53          echo_failure
    54          boot_mesg -n "FAILURE:\n\nCannot mount a tmpfs" ${FAILURE}
    55          boot_mesg -n " onto /dev, this system will be halted."
    56          boot_mesg -n "\n\nAfter you press Enter, this system"
    57          boot_mesg -n " will be halted and powered off."
    58          boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
    59          boot_mesg "" ${NORMAL}
     55         log_failure_msg2
     56         msg="FAILURE:\n\nCannot mount a tmpfs "
     57         msg="${msg}onto /dev, this system will be halted.\n\n"
     58         msg="${msg}After you press Enter, this system "
     59         msg="${msg}will be halted and powered off.\n\n"
     60         log_failure_msg "$msg"
     61         log_info_msg "Press Enter to continue..."
    6062         wait_for_user
    6163         /etc/rc.d/init.d/halt stop
     
    8385      # Now wait for udevd to process the uevents we triggered
    8486      /sbin/udevadm settle
    85       evaluate_retval
     87      log_success_msg2
    8688      ;;
    8789
     
    9294esac
    9395
     96exit 0
     97
    9498# End udev
  • bootscripts/lfs/init.d/udev_retry

    r103bbd6 rf874424  
    66#
    77# Authors     : Alexander E. Patrakov
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    2728### END INIT INFO
    2829
    29 . /lib/boot/functions
     30. /lib/lsb/init-functions
    3031
    3132case "${1}" in
    3233   start)
    33       boot_mesg "Retrying failed uevents, if any..."
     34      log_info_msg "Retrying failed uevents, if any..."
    3435
    35       RUNDIR=$(/sbin/udevadm info --run)
     36      rundir=$(/sbin/udevadm info --run)
    3637      # From Debian: "copy the rules generated before / was mounted
    3738      # read-write":
    3839   
    39       for file in ${RUNDIR}/tmp-rules--*; do
     40      for file in ${rundir}/tmp-rules--*; do
    4041         dest=${file##*tmp-rules--}
    4142         [ "$dest" = '*' ] && break
     
    5859esac
    5960
     61exit 0
     62
    6063# End udev_retry
  • bootscripts/lfs/lib/services/ipv4-static-route

    • Property mode changed from 100644 to 100755
    r103bbd6 rf874424  
    11#!/bin/sh
    22########################################################################
    3 # Begin /lib/boot/ipv4-static-route
     3# Begin /lib/services/ipv4-static-route
    44#
    55# Description : IPV4 Static Route Script
    66#
    77# Authors     : Kevin P. Fleming - kpfleming@linuxfromscratch.org
     8#               DJ Lucas - dj@linuxfromscratch.org
    89# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    910#
     
    1213########################################################################
    1314
    14 . /lib/boot/functions
     15. /lib/lsb/init-functions
    1516. ${IFCONFIG}
    1617
     
    3839
    3940   (*)
    40       boot_mesg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue." ${FAILURE}
    41       echo_failure
     41      log_failure_msg "Unknown route type (${TYPE}) in ${IFCONFIG}, cannot continue."
    4242      exit 1
    4343   ;;
     
    4646if [ -n "${need_ip}" ]; then
    4747   if [ -z "${IP}" ]; then
    48       boot_mesg "IP variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
    49       echo_failure
     48      log_failure_msg "IP variable missing from ${IFCONFIG}, cannot continue."
    5049      exit 1
    5150   fi
    5251
    5352   if [ -z "${PREFIX}" ]; then
    54       boot_mesg "PREFIX variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
    55       echo_failure
     53      log_failure_msg "PREFIX variable missing from ${IFCONFIG}, cannot continue."
    5654      exit 1
    5755   fi
     
    6361if [ -n "${need_gateway}" ]; then
    6462   if [ -z "${GATEWAY}" ]; then
    65       boot_mesg "GATEWAY variable missing from ${IFCONFIG}, cannot continue." ${FAILURE}
    66       echo_failure
     63      log_failure_msg "GATEWAY variable missing from ${IFCONFIG}, cannot continue."
    6764      exit 1
    6865   fi
     
    7673case "${2}" in
    7774   up)
    78       boot_mesg "Adding '${desc}' route to the ${1} interface..."
     75      log_info_msg "Adding '${desc}' route to the ${1} interface..."
    7976      ip route add ${args} dev ${1}
    8077      evaluate_retval
     
    8279   
    8380   down)
    84       boot_mesg "Removing '${desc}' route from the ${1} interface..."
     81      log_info_msg "Removing '${desc}' route from the ${1} interface..."
    8582      ip route del ${args} dev ${1}
    8683      evaluate_retval
     
    9390esac
    9491
    95 # End /bib/boot/ipv4-static-route
     92# End /lib/services/ipv4-static-route
  • bootscripts/lfs/sysconfig/createfiles

    r103bbd6 rf874424  
    99#
    1010# Notes       : The syntax of this file is as follows:
    11 #     if type is equal to "file" or "dir"
    12 #        <filename> <type> <permissions> <user> <group>
    13 #     if type is equal to "dev"
    14 #        <filename> <type> <permissions> <user> <group> <devtype> <major> <minor>
     11#               if type is equal to "file" or "dir"
     12#               <filename> <type> <permissions> <user> <group>
     13#               if type is equal to "dev"
     14#               <filename> <type> <permissions> <user> <group> <devtype>
     15#             <major> <minor>
    1516#
    16 #     <filename> is the name of the file which is to be created
    17 #     <type> is either file, dir, or dev.
    18 #           file creates a new file
    19 #           dir creates a new directory
    20 #           dev creates a new device
    21 #     <devtype> is either block, char or pipe
    22 #           block creates a block device
    23 #           char creates a character deivce
    24 #           pipe creates a pipe, this will ignore the <major> and <minor> fields
    25 #     <major> and <minor> are the major and minor numbers used for the device.
     17#               <filename> is the name of the file which is to be created
     18#               <type> is either file, dir, or dev.
     19#                       file creates a new file
     20#                       dir creates a new directory
     21#                       dev creates a new device
     22#               <devtype> is either block, char or pipe
     23#                       block creates a block device
     24#                       char creates a character deivce
     25#                       pipe creates a pipe, this will ignore the <major> and
     26#           <minor> fields
     27#               <major> and <minor> are the major and minor numbers used for
     28#     the device.
    2629########################################################################
    2730
  • bootscripts/lfs/sysconfig/rc

    r103bbd6 rf874424  
    88# Version     : 00.00
    99#
    10 # Notes       :
     10# Notes       :  Not used by LFS, but present for BLFS compatibility
    1111#
    1212########################################################################
  • chapter01/changelog.xml

    r103bbd6 rf874424  
    3737
    3838-->
     39    <listitem>
     40      <para>2011-09-18</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[bdubbs] - Review and update recent changes to bootscripts.</para>
     44          <itemizedlist>
     45             <listitem><para>Rename /etc/sysconfig/init_params to /etc/sysconfig/rc.site.</para>
     46             </listitem>
     47             <listitem><para>Move network services to /lib/services.</para></listitem>
     48             <listitem><para>Move init-functions to /lib/lsb.</para></listitem>
     49             <listitem><para>Make /lib/lsb a symlink to /lib/services.</para></listitem>
     50             <listitem><para>Create convenience symlink /etc/init.d->/etc/rc.d/init.d
     51                       </para></listitem>
     52             <listitem><para>Add help and man pages to ifup/ifdown.
     53                             </para></listitem>
     54             <listitem><para>Append /run/var/bootlog to /var/log/boot.log at the end of
     55                  the boot sequence.</para></listitem>
     56             <listitem><para>Add capability to step through the boot scripts at boot time.
     57                  </para></listitem>
     58             <listitem><para>Optionally allow environment variables in sysconfig directory's
     59                  console, network, and clock files to be placed in rc.site.
     60                  </para></listitem>
     61             <listitem><para>Add an optional FASTBOOT parameter to set /fastboot when rebooting.
     62                  </para></listitem>
     63          </itemizedlist>
     64        </listitem>
     65        <listitem>
     66           <para>[bdubbs] - Remove a minor warning message from udev that is triggered
     67           by the udev_retry boot script.</para>
     68        </listitem>
     69        <listitem>
     70           <para>[bdubbs] - Add SKIPTMPCLEAN as an optional parameter to skip cleaning
     71           /tmp at boot time.</para>
     72        </listitem>
     73        <listitem>
     74           <para>[bdubbs] - Add a page to Chapter 7 documenting rc.site.</para>
     75        </listitem>
     76      </itemizedlist>
     77    </listitem>
     78
    3979    <listitem>
    4080      <para>2011-09-04</para>
  • chapter05/binutils-pass2.xml

    r103bbd6 rf874424  
    5353<screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \
    5454   AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
    55 <!--   ../binutils-&binutils-version;/configure - -prefix=/tools \ -->
    5655   ../binutils-&binutils-dir;/configure --prefix=/tools \
    5756   --disable-nls --with-lib-path=/tools/lib</userinput></screen>
    5857
     58<!--   ../binutils-&binutils-version;/configure - -prefix=/tools \ -->
    5959    <variablelist>
    6060      <title>The meaning of the new configure options:</title>
  • chapter06/udev.xml

    r103bbd6 rf874424  
    4141  <sect2 role="installation">
    4242    <title>Installation of Udev</title>
     43
     44    <para>Optionally remove an unneeded warning message that shows up in this
     45    version of udev at boot time.</para>
     46
     47<screen><userinput remap="pre">sed -i -e '/deprecated/d' udev/udevadm-trigger.c</userinput></screen>
     48
    4349
    4450    <para>The udev-config tarball contains LFS-specific files used to configure
  • chapter07/bootscripts.xml

    r103bbd6 rf874424  
    5959        sendsignals, setclock, static, swap, sysctl, sysklogd, template,
    6060        udev, and udev_retry</seg>
    61         <seg>/etc/rc.d, /etc/sysconfig, /lib/boot</seg>
     61        <seg>/etc/rc.d, /etc/init.d (symbolic link), /etc/sysconfig,
     62        /lib/services, /lib/lsb (symbolic link)</seg>
    6263      </seglistitem>
    6364    </segmentedlist>
  • chapter07/chapter07.xml

    r103bbd6 rf874424  
    2323  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="console.xml"/>
    2424  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
     25  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="site.xml"/>
    2526  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/>
    2627  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/>
  • chapter07/network.xml

    r103bbd6 rf874424  
    158158    obtaining the IP address. The LFS-Bootscripts package has a modular IP
    159159    assignment format, and creating additional files in the <filename
    160     class="directory">/lib/boot/</filename> directory allows other IP
     160    class="directory">/lib/services/</filename> directory allows other IP
    161161    assignment methods. This is commonly used for Dynamic Host Configuration
    162162    Protocol (DHCP), which is addressed in the BLFS book.</para>
  • chapter07/setclock.xml

    r103bbd6 rf874424  
    6464
    6565  <note><para>The CLOCKPARAMS and UTC paramaters may be alternatively set
    66   in the <filename>/etc/sysconfig/init_params</filename> file.</para></note>
     66  in the <filename>/etc/sysconfig/rc.site</filename> file.</para></note>
    6767
    6868</sect1>
  • chapter07/sysklogd.xml

    r103bbd6 rf874424  
    2020  option.  This option turns off the periodic timestamp mark that
    2121  <command>syslogd</command> writes to the log files every 20 minutes by
    22   default.  If you want to turn on this periodic timestamp mark, create or edit
    23   <filename>/etc/sysconfig/init_params</filename> and define the variable
     22  default.  If you want to turn on this periodic timestamp mark, edit
     23  <filename>/etc/sysconfig/rc.site</filename> and define the variable
    2424  SYSKLOGD_PARMS to the desired value.  For instance, to remove all parameters,
    2525  set the variable to a null value:</para>
  • chapter07/usage.xml

    r103bbd6 rf874424  
    6060id:3:initdefault:
    6161
    62 si::sysinit:/etc/rc.d/init.d/rc sysinit
     62si::sysinit:/etc/rc.d/init.d/rc S
    6363
    6464l0:0:wait:/etc/rc.d/init.d/rc 0
     
    9494
    9595  <para>As a convenience, the <command>rc</command> script reads a library of
    96   functions in <filename class="directory">/lib/boot/functions</filename>.
     96  functions in <filename class="directory">/lib/lsb/init-functions</filename>.
    9797  This library also reads an optional configuration file,
    9898  <filename>/etc/sysconfig/init_params</filename>.  Any of the system
  • general.ent

    r103bbd6 rf874424  
    1 <!ENTITY version "SVN-20110904">
    2 <!ENTITY releasedate "Sep 4, 2011">
     1<!ENTITY version "SVN-20110918">
     2<!ENTITY releasedate "Sep 18, 2011">
    33<!ENTITY copyrightdate "1999-2011"><!-- jhalfs needs a literal dash, not &ndash; -->
    44<!ENTITY milestone "7.0">
  • packages.ent

    r103bbd6 rf874424  
    299299<!ENTITY less-ch6-sbu "less than 0.1 SBU">
    300300
    301 <!ENTITY lfs-bootscripts-version "20110903">                 <!-- Scripts depend on this format -->
     301<!ENTITY lfs-bootscripts-version "20110918">                 <!-- Scripts depend on this format -->
    302302<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">         <!-- Updated in Makefile -->
    303303<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
  • process-scripts.sh

    r103bbd6 rf874424  
    44for s in bootscripts/lfs/init.d/*                    \
    55         bootscripts/lfs/sysconfig/*                 \
    6          bootscripts/lfs/sysconfig/network-devices/* \
    7          bootscripts/lfs/sysconfig/network-devices/services/*
     6         bootscripts/lfs/lib/services/* \
     7         bootscripts/lfs/sbin/*
    88do
    99  script=$(basename $s)
     
    1111  # Skip directories
    1212  [ $script == 'network-devices' ] && continue
    13   [ $script == 'services'        ] && continue
     13  #[ $script == 'services'        ] && continue
    1414
    1515  # Disambiguate duplicate file names
Note: See TracChangeset for help on using the changeset viewer.