Changeset f874424
- Timestamp:
- 09/19/2011 03:31:46 AM (13 years ago)
- 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
- Files:
-
- 7 added
- 3 deleted
- 39 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
appendices/scripts.xml
r103bbd6 rf874424 9 9 <!ENTITY consolelog SYSTEM "consolelog.script"> 10 10 <!ENTITY halt SYSTEM "halt.script"> 11 <!ENTITY initfunctions SYSTEM "init-functions.script"> 11 12 <!ENTITY localnet SYSTEM "localnet.script"> 12 13 <!ENTITY modules SYSTEM "modules.script"> … … 58 59 </sect1> 59 60 61 <sect1 id="init-functions" role="wrap"> 62 <title>/lib/lsb/init-functions</title> 63 <screen>&initfunctions;</screen> 64 </sect1> 65 60 66 <sect1 id="functions" role="wrap"> 61 67 <title>/etc/rc.d/init.d/functions</title> … … 174 180 175 181 <sect1 id="ifup" role="wrap"> 176 <title>/ etc/sysconfig/network-devices/ifup</title>182 <title>/sbin/ifup</title> 177 183 <screen>&ifup;</screen> 178 184 </sect1> 179 185 180 186 <sect1 id="ifdown" role="wrap"> 181 <title>/ etc/sysconfig/network-devices/ifdown</title>187 <title>/sbin/ifdown</title> 182 188 <screen>&ifdown;</screen> 183 189 </sect1> 184 190 185 191 <sect1 id="ipv4static" role="wrap"> 186 <title>/ etc/sysconfig/network-devices/services/ipv4-static</title>192 <title>/lib/services/ipv4-static</title> 187 193 <screen>&ipv4_static;</screen> 188 194 </sect1> 189 195 190 196 <sect1 id="ipv4route" role="wrap"> 191 <title>/ etc/sysconfig/network-devices/services/ipv4-static-route</title>197 <title>/lib/services/ipv4-static-route</title> 192 198 <screen>&ipv4_static_route;</screen> 193 199 </sect1> -
bootscripts/ChangeLog
r103bbd6 rf874424 1 2100-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 1 16 2011-07-14 Bruce Dubbs <bdubbs@linuxfromscratch.org> 2 17 * Major rewrite of all LFS scripts -
bootscripts/Makefile
r103bbd6 rf874424 1 1 ETCDIR=/etc 2 2 EXTDIR=${DESTDIR}${ETCDIR} 3 LIBDIR=${DESTDIR}/lib/boot 3 LIBDIR=${DESTDIR}/lib/services 4 MAN8=/usr/share/man/man8 4 5 MODE=754 5 6 DIRMODE=755 6 7 CONFMODE=644 7 8 8 all: install 9 all: links 10 11 install: all 9 12 10 13 create-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 22 27 23 install: create-dirs28 files: create-dirs 24 29 install -m ${MODE} lfs/init.d/checkfs ${EXTDIR}/rc.d/init.d/ 25 30 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}28 31 install -m ${MODE} lfs/init.d/halt ${EXTDIR}/rc.d/init.d/ 29 32 install -m ${MODE} lfs/init.d/console ${EXTDIR}/rc.d/init.d/ 30 33 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/ 31 35 install -m ${MODE} lfs/init.d/localnet ${EXTDIR}/rc.d/init.d/ 32 36 install -m ${MODE} lfs/init.d/modules ${EXTDIR}/rc.d/init.d/ … … 38 42 install -m ${MODE} lfs/init.d/sendsignals ${EXTDIR}/rc.d/init.d/ 39 43 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/41 44 install -m ${MODE} lfs/init.d/swap ${EXTDIR}/rc.d/init.d/ 42 45 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/ 43 47 install -m ${MODE} lfs/init.d/template ${EXTDIR}/rc.d/init.d/ 44 48 install -m ${MODE} lfs/init.d/udev ${EXTDIR}/rc.d/init.d/ 45 49 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} 82 57 if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then \ 83 58 install -m ${CONFMODE} lfs/sysconfig/createfiles ${EXTDIR}/sysconfig/ ;\ … … 89 64 install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/ ;\ 90 65 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 95 69 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 70 links: files rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 99 71 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/ 72 rcS: 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 86 rc0: 87 ln -sf ../init.d/network ${EXTDIR}/rc.d/rc0.d/K80network 88 ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc0.d/K90sysklogd 115 89 ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc0.d/S60sendsignals 116 90 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc0.d/S70mountfs 117 91 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc0.d/S80swap 92 ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc0.d/S90localnet 118 93 ln -sf ../init.d/halt ${EXTDIR}/rc.d/rc0.d/S99halt 94 95 rc1: 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 99 rc2: 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 103 rc3: 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 107 rc4: 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 111 rc5: 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 115 rc6: 116 ln -sf ../init.d/network ${EXTDIR}/rc.d/rc6.d/K80network 117 ln -sf ../init.d/sysklogd ${EXTDIR}/rc.d/rc6.d/K90sysklogd 119 118 ln -sf ../init.d/sendsignals ${EXTDIR}/rc.d/rc6.d/S60sendsignals 120 119 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rc6.d/S70mountfs 121 120 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rc6.d/S80swap 121 ln -sf ../init.d/localnet ${EXTDIR}/rc.d/rc6.d/S90localnet 122 122 ln -sf ../init.d/reboot ${EXTDIR}/rc.d/rc6.d/S99reboot 123 ln -sf ../init.d/mountvirtfs ${EXTDIR}/rc.d/rcsysinit.d/S00mountvirtfs124 ln -sf ../init.d/udev ${EXTDIR}/rc.d/rcsysinit.d/S10udev125 ln -sf ../init.d/swap ${EXTDIR}/rc.d/rcsysinit.d/S20swap126 ln -sf ../init.d/checkfs ${EXTDIR}/rc.d/rcsysinit.d/S30checkfs127 ln -sf ../init.d/mountfs ${EXTDIR}/rc.d/rcsysinit.d/S40mountfs128 ln -sf ../init.d/cleanfs ${EXTDIR}/rc.d/rcsysinit.d/S45cleanfs129 if [ ! -f ${EXTDIR}/sysconfig/rc ]; then \130 install -m ${CONFMODE} lfs/sysconfig/rc ${EXTDIR}/sysconfig/; \131 fi132 123 133 .PHONY: all create-dirs install 124 .PHONY: all create-dirs install files links rcS rc0 rc1 rc2 rc3 rc4 rc5 rc6 134 125 -
bootscripts/README
r103bbd6 rf874424 1 1 Network Configuration: 2 2 Script Files: 3 /etc/rc.d/init.d/ network3 /etc/rc.d/init.d/* 4 4 /sbin/ifup 5 5 /sbin/ifdown 6 /lib/ boot/*/*6 /lib/lsb/* 7 7 8 8 Configuration Files: 9 9 /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 20 15 21 16 /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 23 19 24 20 Additional Configuration: 25 ipv4-static:26 - IP : static IP Address27 - GATEWAY : Specifies the IP Address of the gateway server28 - PREFIX : CIDR prefix of IP Address, defaults to 24 if not set29 - PEER : IP Address of peer (for point-to-point connections and tunnels)30 - BROADCAST: broadcast address21 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 31 27 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) 37 32 - GATEWAY: IP Address of gateway to reach target (for network and default) 38 33 39 34 40 35 SetClock configuration: 41 Script Files: 42 /etc/rc.d/init.d/ setclock36 37 /etc/rc.d/init.d/cleanfs 43 38 - SKIPTMPCLEAN: skips cleaning of /tmp directory 44 39 45 40 Configuration Files: 46 /etc/sysconfig/clock 41 /etc/sysconfig/clock or /etc/sysconfig/rc.site 47 42 - UTC: 1 assumes hwclock is in UTC 48 43 0 assumes hwclock is in local time -
bootscripts/lfs/init.d/checkfs
r103bbd6 rf874424 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 8 # A. Luebke - luebke@users.sourceforge.net 9 # DJ Lucas - dj@linuxfromscratch.org 9 10 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 11 # … … 38 39 ### END INIT INFO 39 40 40 . /lib/ boot/functions41 . /lib/lsb/init-functions 41 42 42 43 case "${1}" in 43 44 start) 44 45 if [ -f /fastboot ]; then 45 boot_mesg -n "/fastboot found, will not perform" ${INFO}46 boot_mesg " file system checks as requested."47 echo_ok46 msg="/fastboot found, will omit " 47 msg="${msg} file system checks as requested.\n" 48 log_info_msg "${msg}" 48 49 exit 0 49 50 fi 50 51 51 boot_mesg "Mounting root file system in read-only mode..."52 log_info_msg "Mounting root file system in read-only mode... " 52 53 mount -n -o remount,ro / >/dev/null 53 evaluate_retval54 54 55 55 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..." 64 65 wait_for_user 65 66 /etc/rc.d/init.d/halt stop 67 else 68 log_success_msg2 66 69 fi 67 70 68 71 if [ -f /forcefsck ]; then 69 boot_mesg -n "/forcefsck found, forcing file" ${INFO}70 boot_mesg "system checks as requested."71 echo_ok72 msg="\n/forcefsck found, forcing file" 73 msg="${msg} system checks as requested." 74 log_success_msg "$msg" 72 75 options="-f" 73 76 else … … 75 78 fi 76 79 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 80 82 fsck ${options} -a -A -C -T 81 83 error_value=${?} 82 84 83 85 if [ "${error_value}" = 0 ]; then 84 echo_ok86 log_success_msg2 85 87 fi 86 88 87 89 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" 94 95 fi 95 96 96 97 if [ "${error_value}" = 2 -o "${error_value}" = 3 ]; then 97 echo_warning98 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..." 106 107 wait_for_user 107 108 reboot -f … … 109 110 110 111 if [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then 111 echo_failure112 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..." 123 124 wait_for_user 124 /etc/rc.d/init.d/halt stop125 /etc/rc.d/init.d/halt stop 125 126 fi 126 127 127 128 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 133 133 exit ${error_value} 134 134 fi 135 136 exit 0 135 137 ;; 136 138 *) -
bootscripts/lfs/init.d/cleanfs
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 27 28 ### END INIT INFO 28 29 29 . /lib/ boot/functions30 . /lib/lsb/init-functions 30 31 31 32 # Function to create files/directory on boot. 32 create_files() { 33 # Read in the configuration file. 33 function create_files() 34 { 35 # Input to file descriptor 9 and output to stdin (redirection) 34 36 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 ;; 40 75 esac 41 76 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 75 82 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) 81 84 exec 0>&9 9>&- 85 return 0 82 86 } 83 87 84 88 case "${1}" in 85 89 start) 86 boot_mesg -n "Cleaning file systems:" ${INFO}90 log_info_msg "Cleaning file systems:" 87 91 88 92 if [ "${SKIPTMPCLEAN}" = "" ]; then 89 boot_mesg -n " /tmp" ${NORMAL}93 log_info_msg2 "\n /tmp" 90 94 cd /tmp && 91 95 find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 … … 103 107 104 108 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 107 111 evaluate_retval 108 112 fi 113 114 exit $failed 109 115 ;; 110 116 *) -
bootscripts/lfs/init.d/console
r103bbd6 rf874424 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 8 # Alexander E. Patrakov 9 # DJ Lucas - dj@linuxfromscratch.org 9 10 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 11 # … … 12 13 # 13 14 ######################################################################## 14 15 . /lib/boot/functions16 15 17 16 ### BEGIN INIT INFO … … 29 28 ### END INIT INFO 30 29 30 . /lib/lsb/init-functions 31 31 32 # 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 35 function is_true() 36 { 37 [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ] 38 } 39 40 # See if we need to do anything 41 if [ -z "${KEYMAP}" ] && [ -z "${KEYMAP_CORRECTIONS}" ] && 42 [ -z "${FONT}" ] && [ is_true "${UNICODE}" ] && 43 [ -z "${LEGACY_CHARSET}" ]; then 35 44 exit 0 36 45 fi 37 38 is_true() {39 [ "$1" = "1" ] || [ "$1" = "yes" ] || [ "$1" = "true" ]40 }41 46 42 47 failed=0 … … 44 49 case "${1}" in 45 50 start) 46 boot_mesg "Setting up Linux console..."47 51 # There should be no bogus failures below this line! 52 log_info_msg "Setting up Linux console..." 48 53 49 54 # Figure out if a framebuffer console is used 50 [ -d /sys/class/graphics/fb0 ] && USE_FB=1 || USE_FB=055 [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0 51 56 52 57 # Figure out the command to set the console into the 53 58 # desired mode 54 59 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" 57 62 58 63 # On framebuffer consoles, font has to be set for each vt in 59 64 # UTF-8 mode. This doesn't hurt in non-UTF-8 mode also. 60 65 61 ! is_true "${ USE_FB}" || [ -z "${FONT}" ] ||66 ! is_true "${use_fb}" || [ -z "${FONT}" ] || 62 67 MODE_COMMAND="${MODE_COMMAND} && setfont ${FONT}" 63 68 … … 67 72 # show up and the unicode map of the font will not be 68 73 # used. 69 # FIXME: Fedora Core also initializes two spare consoles70 # - do we want that?71 74 72 75 for TTY in `grep '^[^#].*respawn:/sbin/agetty' /etc/inittab | … … 78 81 79 82 # 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 83 85 [ -z "${KEYMAP}" ] || 84 86 loadkeys ${KEYMAP} >/dev/null 2>&1 || 85 87 failed=1 88 86 89 [ -z "${KEYMAP_CORRECTIONS}" ] || 87 90 loadkeys ${KEYMAP_CORRECTIONS} >/dev/null 2>&1 || … … 90 93 # Convert the keymap from $LEGACY_CHARSET to UTF-8 91 94 [ -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 || 94 96 failed=1 95 97 96 98 # If any of the commands above failed, the trap at the 97 99 # top would set $failed to 1 98 ( exit $failed ) 100 ( exit $failed ) 99 101 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 ;; 105 110 esac 106 111 -
bootscripts/lfs/init.d/consolelog
r103bbd6 rf874424 6 6 # 7 7 # 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 9 10 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 11 # … … 28 29 ### END INIT INFO 29 30 30 . /lib/ boot/functions31 . /lib/lsb/init-functions 31 32 32 # set the default loglevel 33 LOGLEVEL= 733 # set the default loglevel if needed 34 LOGLEVEL=${LOGLEVEL:-7} 34 35 35 [ -r /etc/sysconfig/console ] && 36 [ -r /etc/sysconfig/console ] && . /etc/sysconfig/console 36 37 37 38 case "${1}" in … … 39 40 case "$LOGLEVEL" in 40 41 [1-8]) 41 boot_mesg "Setting the console log level to ${LOGLEVEL}..."42 log_info_msg "Setting the console log level to ${LOGLEVEL}..." 42 43 dmesg -n $LOGLEVEL 43 44 evaluate_retval 45 exit 0 44 46 ;; 47 45 48 *) 46 boot_mesg "Console log level '${LOGLEVEL}' is invalid" ${FAILURE}47 e cho_failure49 log_failure_msg "Console log level '${LOGLEVEL}' is invalid" 50 exit 1 48 51 ;; 52 49 53 esac 50 54 ;; … … 55 59 read level line < /proc/sys/kernel/printk 56 60 else 57 boot_mesg "Can't read the current console log level" ${FAILURE}58 e cho_failure61 log_failure_msg "Can't read the current console log level" 62 exit 1 59 63 fi 60 64 61 65 # Print the value 62 66 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 64 69 fi 65 70 ;; -
bootscripts/lfs/init.d/functions
r103bbd6 rf874424 13 13 # http://winterdrache.de/linux/newboot/index.html 14 14 # 15 # Th e file should be located in /lib/boot15 # This file is only present for backward BLFS compatibility 16 16 # 17 17 ######################################################################## 18 18 19 19 # Set any needed environment variables e.g. HEADLESS 20 [ -r /etc/sysconfig/init_params ] && . /etc/sysconfig/init_params20 . /lib/lsb/init_params 21 21 22 22 ## Environmental setup -
bootscripts/lfs/init.d/halt
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # -
bootscripts/lfs/init.d/localnet
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 26 27 ### END INIT INFO 27 28 28 . /lib/ boot/functions29 . /etc/sysconfig/network29 . /lib/lsb/init-functions 30 [ -r /etc/sysconfig/network ] && . /etc/sysconfig/network 30 31 31 32 case "${1}" in 32 33 start) 33 boot_mesg "Bringing up the loopback interface..."34 log_info_msg "Bringing up the loopback interface..." 34 35 ip addr add 127.0.0.1/8 label lo dev lo 35 36 ip link set lo up 36 37 evaluate_retval 37 38 38 boot_mesg "Setting hostname to ${HOSTNAME}..."39 log_info_msg "Setting hostname to ${HOSTNAME}..." 39 40 hostname ${HOSTNAME} 40 41 evaluate_retval … … 42 43 43 44 stop) 44 boot_mesg "Bringing down the loopback interface..."45 log_info_msg "Bringing down the loopback interface..." 45 46 ip link set lo down 46 47 evaluate_retval … … 64 65 esac 65 66 67 exit 0 68 66 69 # End localnet -
bootscripts/lfs/init.d/modules
r103bbd6 rf874424 6 6 # 7 7 # Authors : Zack Winkles 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 25 26 ### END INIT INFO 26 27 27 . /lib/boot/functions28 29 28 # Assure that the kernel has module support. 30 29 [ -e /proc/ksyms -o -e /proc/modules ] || exit 0 30 31 . /lib/lsb/init-functions 31 32 32 33 case "${1}" in … … 34 35 # Exit if there's no modules file or there are no 35 36 # 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 39 39 40 boot_mesg -n "Loading modules:" ${INFO}40 log_info_msg "Loading modules:" 41 41 42 42 # Only try to load modules if the user has actually given us 43 43 # some modules to load. 44 44 45 while read module args; do 45 46 … … 49 50 esac 50 51 51 # Attempt to load the module, making 52 # sure to pass any arguments provided. 52 # Attempt to load the module, passing any arguments provided. 53 53 modprobe ${module} ${args} >/dev/null 54 54 55 # Print the module name if successful, 56 # otherwise take note. 55 # Print the module name if successful, otherwise take note. 57 56 if [ $? -eq 0 ]; then 58 boot_mesg -n " ${module}" ${NORMAL}57 log_info_msg2 " ${module}" 59 58 else 60 59 failedmod="${failedmod} ${module}" … … 62 61 done < /etc/sysconfig/modules 63 62 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 68 65 69 # Print a failure message with a list of any 70 # m odules that may have failed to load.66 # Print a failure message with a list of any modules that 67 # may have failed to load. 71 68 if [ -n "${failedmod}" ]; then 72 boot_mesg "Failed to load modules:${failedmod}" ${FAILURE}73 e cho_failure69 log_failure_msg "Failed to load modules:${failedmod}" 70 exit 1 74 71 fi 75 72 ;; … … 81 78 esac 82 79 80 exit 0 81 83 82 # End modules -
bootscripts/lfs/init.d/mountfs
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 28 29 ### END INIT INFO 29 30 30 . /lib/ boot/functions31 . /lib/lsb/init-functions 31 32 32 33 case "${1}" in 33 34 start) 34 boot_mesg "Remounting root file system in read-write mode..."35 log_info_msg "Remounting root file system in read-write mode..." 35 36 mount -n -o remount,rw / >/dev/null 36 37 evaluate_retval … … 39 40 rm -f /fastboot /forcefsck 40 41 41 boot_mesg "Recording existing mounts in /etc/mtab..."42 log_info_msg "Recording existing mounts in /etc/mtab..." 42 43 > /etc/mtab 43 44 … … 51 52 # This will mount all filesystems that do not have _netdev in 52 53 # their option list. _netdev denotes a network filesystem. 53 boot_mesg "Mounting remaining file systems..." 54 55 log_info_msg "Mounting remaining file systems..." 54 56 mount -a -O no_netdev >/dev/null 55 57 evaluate_retval 58 exit $failed 56 59 ;; 57 60 58 61 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..." 60 64 umount -a -d -r -t notmpfs >/dev/null 61 65 evaluate_retval 66 exit 0 62 67 ;; 63 68 -
bootscripts/lfs/init.d/mountvirtfs
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 27 28 ### END INIT INFO 28 29 29 . /lib/ boot/functions30 . /lib/lsb/init-functions 30 31 31 32 case "${1}" in 32 33 start) 34 # Make sure /run/var is available before logging any messages 33 35 mkdir -p /run 34 36 mount -n /run || failed=1 35 37 mkdir -p /run/{var,lock,shm} 36 38 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" 40 40 41 41 if ! mountpoint /proc >/dev/null; then 42 boot_mesg -n " /proc" ${NORMAL}42 log_info_msg2 " /proc" 43 43 mount -n /proc || failed=1 44 44 fi 45 45 46 46 if ! mountpoint /sys >/dev/null; then 47 boot_mesg -n " /sys" ${NORMAL}47 log_info_msg2 " /sys" 48 48 mount -n /sys || failed=1 49 49 fi 50 50 51 boot_mesg "" ${NORMAL}52 53 51 (exit ${failed}) 54 52 evaluate_retval 53 exit $failed 55 54 ;; 56 55 … … 61 60 esac 62 61 63 # End mountv ertfs62 # End mountvirtfs -
bootscripts/lfs/init.d/network
r103bbd6 rf874424 8 8 # Nathan Coulson - nathan@linuxfromscratch.org 9 9 # Kevin P. Fleming - kpfleming@linuxfromscratch.org 10 # DJ Lucas - dj@linuxfromscratch.org 10 11 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 11 12 # … … 34 35 interface=${file##*/ifconfig.} 35 36 36 # skip if $file is * (because nothing was found)37 # Skip if $file is * (because nothing was found) 37 38 if [ "${interface}" = "*" ] 38 39 then … … 46 47 stop) 47 48 # Reverse list 48 FILES=""49 net_files="" 49 50 for file in /etc/sysconfig/ifconfig.* 50 51 do 51 FILES="${file} ${FILES}"52 net_files="${file} ${net_files}" 52 53 done 53 54 54 55 # Stop all network interfaces 55 for file in ${ FILES}56 for file in ${net_files} 56 57 do 57 58 interface=${file##*/ifconfig.} 58 59 59 # skip if $file is * (because nothing was found)60 # Skip if $file is * (because nothing was found) 60 61 if [ "${interface}" = "*" ] 61 62 then … … 79 80 esac 80 81 82 exit 0 83 81 84 # End network -
bootscripts/lfs/init.d/rc
r103bbd6 rf874424 1 #!/bin/ sh1 #!/bin/bash 2 2 ######################################################################## 3 3 # Begin rc … … 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # : DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 12 13 ######################################################################## 13 14 14 . /lib/ boot/functions15 . /lib/lsb/init-functions 15 16 16 print_error_msg()17 function print_error_msg() 17 18 { 18 echo_failure19 log_failure_msg 19 20 # $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_flush25 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_flush30 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..." 32 33 wait_for_user 33 34 } 34 35 35 check_script_status()36 function check_script_status() 36 37 { 37 38 # $i is set when called 38 39 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." 41 41 continue 42 42 fi 43 43 44 44 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." 47 46 continue 48 47 fi 49 48 } 50 49 51 # This sets a few default terminal options. 52 stty sane 50 function 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 87 DISTRO=${DISTRO:-"Linux From Scratch"} 88 DISTRO_CONTACT=${DISTRO_CONTACT:-"lfs-dev@linuxfromscratch.org (Registration required)"} 89 DISTRO_MINI=${DISTRO_MINI:-"LFS"} 53 90 54 91 # These 3 signals will not cause our script to exit … … 66 103 67 104 if [ ! -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" 69 106 exit 1 107 fi 108 109 if [ "$runlevel" == "6" ] || [ "$runlevel" == "0" ]; then IPROMPT="no"; fi 110 111 if [ "${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="" 70 126 fi 71 127 … … 79 135 suffix=${i#/etc/rc.d/rc$runlevel.d/K[0-9][0-9]} 80 136 prev_start=/etc/rc.d/rc$previous.d/S[0-9][0-9]$suffix 81 sysinit_start=/etc/rc.d/rc sysinit.d/S[0-9][0-9]$suffix137 sysinit_start=/etc/rc.d/rcS.d/S[0-9][0-9]$suffix 82 138 83 if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then139 if [ "${runlevel}" != "0" ] && [ "${runlevel}" != "6" ]; then 84 140 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" 91 146 continue 92 147 fi 93 148 fi 94 ${i} stop 149 150 run ${i} stop 95 151 error_value=${?} 96 152 97 if [ "${error_value}" != "0" ]; then 98 print_error_msg 99 fi 153 if [ "${error_value}" != "0" ]; then print_error_msg; fi 100 154 done 101 155 fi 102 156 103 if [ "${previous}" = "N" ]; then 104 IN_BOOT=1 105 export IN_BOOT 157 if [ "${previous}" == "N" ]; then export IN_BOOT=1; fi 158 159 if [ "$runlevel" == "6" ] && [ -n ${FASTBOOT} ]; then 160 touch /fastboot 106 161 fi 107 162 108 #Start all functions in this runlevel 163 164 # Start all functions in this runlevel 109 165 for i in $( ls -v /etc/rc.d/rc${runlevel}.d/S* 2> /dev/null) 110 166 do … … 121 177 case ${runlevel} in 122 178 0|6) 123 ${i} stop179 run ${i} stop 124 180 ;; 125 181 *) 126 ${i} start182 run ${i} start 127 183 ;; 128 184 esac 185 129 186 error_value=${?} 130 187 131 if [ "${error_value}" != "0" ]; then 132 print_error_msg 133 fi 188 if [ "${error_value}" != "0" ]; then print_error_msg; fi 134 189 done 135 190 191 # Copy the boot log on initial boot only 192 if [ "${previous}" == "N" ]; then 193 cat /run/var/bootlog >> /var/log/boot.log 194 echo "--------" >> /var/log/boot.log # Mark the end of boot 195 fi 196 136 197 # End rc -
bootscripts/lfs/init.d/reboot
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 25 26 ### END INIT INFO 26 27 27 . /lib/ boot/functions28 . /lib/lsb/init-functions 28 29 29 30 case "${1}" in 30 31 stop) 31 boot_mesg "Restarting system..."32 log_info_msg "Restarting system..." 32 33 reboot -d -f -i 33 34 ;; -
bootscripts/lfs/init.d/sendsignals
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 25 26 ### END INIT INFO 26 27 27 . /lib/ boot//functions28 . /lib/lsb/init-functions 28 29 29 30 case "${1}" in 30 31 stop) 31 boot_mesg "Sending all processes the TERM signal..."32 log_info_msg "Sending all processes the TERM signal..." 32 33 killall5 -15 33 34 error_value=${?} … … 36 37 37 38 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then 38 echo_ok39 log_success_msg 39 40 else 40 echo_failure41 log_failure_msg 41 42 fi 42 43 43 boot_mesg "Sending all processes the KILL signal..."44 log_info_msg "Sending all processes the KILL signal..." 44 45 killall5 -9 45 46 error_value=${?} … … 48 49 49 50 if [ "${error_value}" = 0 -o "${error_value}" = 2 ]; then 50 echo_ok51 log_success_msg 51 52 else 52 echo_failure53 log_failure_msg 53 54 fi 54 55 ;; … … 61 62 esac 62 63 64 exit 0 65 63 66 # End sendsignals -
bootscripts/lfs/init.d/setclock
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 26 27 ### END INIT INFO 27 28 28 . /lib/ boot/functions29 . /lib/lsb/init-functions 29 30 30 [ -r /etc/sysconfig/clock ] && 31 [ -r /etc/sysconfig/clock ] && . /etc/sysconfig/clock 31 32 32 33 … … 44 45 case ${1} in 45 46 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..." 47 49 hwclock --hctosys ${CLOCKPARAMS} >/dev/null 48 50 evaluate_retval … … 50 52 51 53 stop) 52 boot_mesg "Setting hardware clock..."54 log_info_msg "Setting hardware clock..." 53 55 hwclock --systohc ${CLOCKPARAMS} >/dev/null 54 56 evaluate_retval … … 57 59 *) 58 60 echo "Usage: ${0} {start|stop}" 61 exit 1 59 62 ;; 60 63 61 64 esac 65 66 exit 0 -
bootscripts/lfs/init.d/swap
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 26 27 ### END INIT INFO 27 28 28 . /lib/ boot/functions29 . /lib/lsb/init-functions 29 30 30 31 case "${1}" in 31 32 start) 32 boot_mesg "Activating all swap files/partitions..."33 log_info_msg "Activating all swap files/partitions..." 33 34 swapon -a 34 35 evaluate_retval … … 36 37 37 38 stop) 38 boot_mesg "Deactivating all swap files/partitions..."39 log_info_msg "Deactivating all swap files/partitions..." 39 40 swapoff -a 40 41 evaluate_retval … … 48 49 49 50 status) 50 boot_mesg "Retrieving swap status." ${INFO} 51 echo_ok 52 echo 51 log_success_msg "Retrieving swap status." 53 52 swapon -s 54 53 ;; … … 60 59 esac 61 60 61 exit 0 62 62 63 # End swap -
bootscripts/lfs/init.d/sysctl
r103bbd6 rf874424 8 8 # Authors : Nathan Coulson (nathan@linuxfromscratch.org) 9 9 # Matthew Burgress (matthew@linuxfromscratch.org) 10 # DJ Lucas - dj@linuxfromscratch.org 10 11 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 11 12 # … … 28 29 ### END INIT INFO 29 30 30 . /lib/ boot/functions31 . /lib/lsb/init-functions 31 32 32 33 case "${1}" in 33 34 start) 34 35 if [ -f "/etc/sysctl.conf" ]; then 35 boot_mesg "Setting kernel runtime parameters..."36 log_info_msg "Setting kernel runtime parameters..." 36 37 sysctl -q -p 37 38 evaluate_retval … … 49 50 esac 50 51 52 exit 0 53 51 54 # End sysctl -
bootscripts/lfs/init.d/sysklogd
r103bbd6 rf874424 6 6 # 7 7 # Authors : Gerard Beekmans - gerard@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 26 27 ### END INIT INFO 27 28 28 . /lib/ boot/functions29 . /lib/lsb/init-functions 29 30 30 31 case "${1}" in 31 32 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 35 37 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 38 41 ;; 39 42 40 43 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 43 47 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 46 51 ;; 47 52 48 53 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 51 58 ;; 52 59 … … 57 64 ;; 58 65 59 status)60 statusproc syslogd61 statusproc klogd62 ;;63 64 66 *) 65 echo "Usage: ${0} {start|stop|reload|restart |status}"67 echo "Usage: ${0} {start|stop|reload|restart}" 66 68 exit 1 67 69 ;; 68 70 esac 69 71 72 exit 0 73 70 74 # End sysklogd -
bootscripts/lfs/init.d/template
r103bbd6 rf874424 26 26 ### END INIT INFO 27 27 28 . /lib/ boot/functions28 . /lib/lsb/init-functions 29 29 30 30 case "${1}" in 31 31 start) 32 boot_mesg "Starting..."33 loadproc32 log_info_msg "Starting..." 33 start_daemon fully_qualified_path 34 34 ;; 35 35 36 36 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 44 39 ;; 45 40 … … 50 45 ;; 51 46 52 status)53 statusproc54 ;;55 56 47 *) 57 echo "Usage: ${0} {start|stop|re load|restart|status}"48 echo "Usage: ${0} {start|stop|restart}" 58 49 exit 1 59 50 ;; 60 51 esac 61 52 53 exit 0 54 62 55 # End scriptname -
bootscripts/lfs/init.d/udev
r103bbd6 rf874424 6 6 # 7 7 # Authors : Zack Winkles, Alexander E. Patrakov 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 26 27 ### END INIT INFO 27 28 28 . /lib/ boot/functions29 . /lib/lsb/init-functions 29 30 30 31 case "${1}" in 31 32 start) 32 boot_mesg "Populating /dev with device nodes..."33 log_info_msg "Populating /dev with device nodes... " 33 34 if ! grep -q '[[:space:]]sysfs' /proc/mounts; then 34 echo_failure35 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..." 41 42 wait_for_user 42 43 /etc/rc.d/init.d/halt stop … … 50 51 mount -n -t tmpfs tmpfs /dev -o mode=755 51 52 fi 53 52 54 if [ ${?} != 0 ]; then 53 echo_failure54 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..." 60 62 wait_for_user 61 63 /etc/rc.d/init.d/halt stop … … 83 85 # Now wait for udevd to process the uevents we triggered 84 86 /sbin/udevadm settle 85 evaluate_retval87 log_success_msg2 86 88 ;; 87 89 … … 92 94 esac 93 95 96 exit 0 97 94 98 # End udev -
bootscripts/lfs/init.d/udev_retry
r103bbd6 rf874424 6 6 # 7 7 # Authors : Alexander E. Patrakov 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 27 28 ### END INIT INFO 28 29 29 . /lib/ boot/functions30 . /lib/lsb/init-functions 30 31 31 32 case "${1}" in 32 33 start) 33 boot_mesg "Retrying failed uevents, if any..."34 log_info_msg "Retrying failed uevents, if any..." 34 35 35 RUNDIR=$(/sbin/udevadm info --run)36 rundir=$(/sbin/udevadm info --run) 36 37 # From Debian: "copy the rules generated before / was mounted 37 38 # read-write": 38 39 39 for file in ${ RUNDIR}/tmp-rules--*; do40 for file in ${rundir}/tmp-rules--*; do 40 41 dest=${file##*tmp-rules--} 41 42 [ "$dest" = '*' ] && break … … 58 59 esac 59 60 61 exit 0 62 60 63 # End udev_retry -
bootscripts/lfs/lib/services/ipv4-static-route
-
Property mode
changed from
100644
to100755
r103bbd6 rf874424 1 1 #!/bin/sh 2 2 ######################################################################## 3 # Begin /lib/ boot/ipv4-static-route3 # Begin /lib/services/ipv4-static-route 4 4 # 5 5 # Description : IPV4 Static Route Script 6 6 # 7 7 # Authors : Kevin P. Fleming - kpfleming@linuxfromscratch.org 8 # DJ Lucas - dj@linuxfromscratch.org 8 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 9 10 # … … 12 13 ######################################################################## 13 14 14 . /lib/ boot/functions15 . /lib/lsb/init-functions 15 16 . ${IFCONFIG} 16 17 … … 38 39 39 40 (*) 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." 42 42 exit 1 43 43 ;; … … 46 46 if [ -n "${need_ip}" ]; then 47 47 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." 50 49 exit 1 51 50 fi 52 51 53 52 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." 56 54 exit 1 57 55 fi … … 63 61 if [ -n "${need_gateway}" ]; then 64 62 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." 67 64 exit 1 68 65 fi … … 76 73 case "${2}" in 77 74 up) 78 boot_mesg "Adding '${desc}' route to the ${1} interface..."75 log_info_msg "Adding '${desc}' route to the ${1} interface..." 79 76 ip route add ${args} dev ${1} 80 77 evaluate_retval … … 82 79 83 80 down) 84 boot_mesg "Removing '${desc}' route from the ${1} interface..."81 log_info_msg "Removing '${desc}' route from the ${1} interface..." 85 82 ip route del ${args} dev ${1} 86 83 evaluate_retval … … 93 90 esac 94 91 95 # End / bib/boot/ipv4-static-route92 # End /lib/services/ipv4-static-route -
Property mode
changed from
-
bootscripts/lfs/sysconfig/createfiles
r103bbd6 rf874424 9 9 # 10 10 # 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> 15 16 # 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. 26 29 ######################################################################## 27 30 -
bootscripts/lfs/sysconfig/rc
r103bbd6 rf874424 8 8 # Version : 00.00 9 9 # 10 # Notes : 10 # Notes : Not used by LFS, but present for BLFS compatibility 11 11 # 12 12 ######################################################################## -
chapter01/changelog.xml
r103bbd6 rf874424 37 37 38 38 --> 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 39 79 <listitem> 40 80 <para>2011-09-04</para> -
chapter05/binutils-pass2.xml
r103bbd6 rf874424 53 53 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \ 54 54 AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ 55 <!-- ../binutils-&binutils-version;/configure - -prefix=/tools \ -->56 55 ../binutils-&binutils-dir;/configure --prefix=/tools \ 57 56 --disable-nls --with-lib-path=/tools/lib</userinput></screen> 58 57 58 <!-- ../binutils-&binutils-version;/configure - -prefix=/tools \ --> 59 59 <variablelist> 60 60 <title>The meaning of the new configure options:</title> -
chapter06/udev.xml
r103bbd6 rf874424 41 41 <sect2 role="installation"> 42 42 <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 43 49 44 50 <para>The udev-config tarball contains LFS-specific files used to configure -
chapter07/bootscripts.xml
r103bbd6 rf874424 59 59 sendsignals, setclock, static, swap, sysctl, sysklogd, template, 60 60 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> 62 63 </seglistitem> 63 64 </segmentedlist> -
chapter07/chapter07.xml
r103bbd6 rf874424 23 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="console.xml"/> 24 24 <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"/> 25 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="profile.xml"/> 26 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inputrc.xml"/> -
chapter07/network.xml
r103bbd6 rf874424 158 158 obtaining the IP address. The LFS-Bootscripts package has a modular IP 159 159 assignment format, and creating additional files in the <filename 160 class="directory">/lib/ boot/</filename> directory allows other IP160 class="directory">/lib/services/</filename> directory allows other IP 161 161 assignment methods. This is commonly used for Dynamic Host Configuration 162 162 Protocol (DHCP), which is addressed in the BLFS book.</para> -
chapter07/setclock.xml
r103bbd6 rf874424 64 64 65 65 <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> 67 67 68 68 </sect1> -
chapter07/sysklogd.xml
r103bbd6 rf874424 20 20 option. This option turns off the periodic timestamp mark that 21 21 <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 oredit23 <filename>/etc/sysconfig/ init_params</filename> and define the variable22 default. If you want to turn on this periodic timestamp mark, edit 23 <filename>/etc/sysconfig/rc.site</filename> and define the variable 24 24 SYSKLOGD_PARMS to the desired value. For instance, to remove all parameters, 25 25 set the variable to a null value:</para> -
chapter07/usage.xml
r103bbd6 rf874424 60 60 id:3:initdefault: 61 61 62 si::sysinit:/etc/rc.d/init.d/rc sysinit62 si::sysinit:/etc/rc.d/init.d/rc S 63 63 64 64 l0:0:wait:/etc/rc.d/init.d/rc 0 … … 94 94 95 95 <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>. 97 97 This library also reads an optional configuration file, 98 98 <filename>/etc/sysconfig/init_params</filename>. Any of the system -
general.ent
r103bbd6 rf874424 1 <!ENTITY version "SVN-201109 04">2 <!ENTITY releasedate "Sep 4, 2011">1 <!ENTITY version "SVN-20110918"> 2 <!ENTITY releasedate "Sep 18, 2011"> 3 3 <!ENTITY copyrightdate "1999-2011"><!-- jhalfs needs a literal dash, not – --> 4 4 <!ENTITY milestone "7.0"> -
packages.ent
r103bbd6 rf874424 299 299 <!ENTITY less-ch6-sbu "less than 0.1 SBU"> 300 300 301 <!ENTITY lfs-bootscripts-version "201109 03"> <!-- Scripts depend on this format -->301 <!ENTITY lfs-bootscripts-version "20110918"> <!-- Scripts depend on this format --> 302 302 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!-- Updated in Makefile --> 303 303 <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2"> -
process-scripts.sh
r103bbd6 rf874424 4 4 for s in bootscripts/lfs/init.d/* \ 5 5 bootscripts/lfs/sysconfig/* \ 6 bootscripts/lfs/ sysconfig/network-devices/* \7 bootscripts/lfs/s ysconfig/network-devices/services/*6 bootscripts/lfs/lib/services/* \ 7 bootscripts/lfs/sbin/* 8 8 do 9 9 script=$(basename $s) … … 11 11 # Skip directories 12 12 [ $script == 'network-devices' ] && continue 13 [ $script == 'services' ] && continue13 #[ $script == 'services' ] && continue 14 14 15 15 # Disambiguate duplicate file names
Note:
See TracChangeset
for help on using the changeset viewer.