Changeset 010d108 for bootscripts/contrib/lsb-v3
- Timestamp:
- 08/31/2008 06:24:27 AM (16 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, 12.2, 12.2-rc1, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 1e6b6d5
- Parents:
- 59dc6e1
- Location:
- bootscripts/contrib/lsb-v3
- Files:
-
- 1 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/contrib/lsb-v3/ChangeLog
r59dc6e1 r010d108 1 1 ChangeLog 2 20080831 - [dj] * Corrected more, and minimized dependencies in scripts. 3 * Don't try to write to bootlog in 0 and 6. 4 * Use /etc/rcS.d instead of /etc/rcsysinit.d - added 5 replacement /etc/inittab file 2 6 3 20080830 - [dj] * Corrected remaining dependency errors in scr pt headers.7 20080830 - [dj] * Corrected remaining dependency errors in script headers. 4 8 5 9 20080531 - [dj] * Synced with LFS-Bootscrpts-20080531 (use udevadm) -
bootscripts/contrib/lsb-v3/Makefile
r59dc6e1 r010d108 15 15 install -d -m ${DIRMODE} ${EXTDIR}/rc5.d 16 16 install -d -m ${DIRMODE} ${EXTDIR}/rc6.d 17 install -d -m ${DIRMODE} ${EXTDIR}/rc sysinit.d17 install -d -m ${DIRMODE} ${EXTDIR}/rcS.d 18 18 install -d -m ${DIRMODE} ${EXTDIR}/init.d 19 19 install -d -m ${DIRMODE} ${EXTDIR}/sysconfig … … 75 75 ln -sf ../init.d/localnet ${EXTDIR}/rc6.d/S90localnet 76 76 ln -sf ../init.d/reboot ${EXTDIR}/rc6.d/S99reboot 77 ln -sf ../init.d/mountkernfs ${EXTDIR}/rc sysinit.d/S00mountkernfs78 ln -sf ../init.d/sysctl ${EXTDIR}/rc sysinit.d/S05sysctl79 ln -sf ../init.d/modules ${EXTDIR}/rc sysinit.d/S10modules80 ln -sf ../init.d/udev ${EXTDIR}/rc sysinit.d/S15udev81 ln -sf ../init.d/swap ${EXTDIR}/rc sysinit.d/S20swap82 ln -sf ../init.d/setclock ${EXTDIR}/rc sysinit.d/S25setclock83 ln -sf ../init.d/checkfs ${EXTDIR}/rc sysinit.d/S30checkfs84 ln -sf ../init.d/mountfs ${EXTDIR}/rc sysinit.d/S40mountfs85 ln -sf ../init.d/udev_retry ${EXTDIR}/rc sysinit.d/S45udev_retry86 ln -sf ../init.d/cleanfs ${EXTDIR}/rc sysinit.d/S50cleanfs87 ln -sf ../init.d/console ${EXTDIR}/rc sysinit.d/S70console88 ln -sf ../init.d/localnet ${EXTDIR}/rc sysinit.d/S80localnet77 ln -sf ../init.d/mountkernfs ${EXTDIR}/rcS.d/S00mountkernfs 78 ln -sf ../init.d/sysctl ${EXTDIR}/rcS.d/S05sysctl 79 ln -sf ../init.d/modules ${EXTDIR}/rcS.d/S10modules 80 ln -sf ../init.d/udev ${EXTDIR}/rcS.d/S15udev 81 ln -sf ../init.d/swap ${EXTDIR}/rcS.d/S20swap 82 ln -sf ../init.d/setclock ${EXTDIR}/rcS.d/S25setclock 83 ln -sf ../init.d/checkfs ${EXTDIR}/rcS.d/S30checkfs 84 ln -sf ../init.d/mountfs ${EXTDIR}/rcS.d/S40mountfs 85 ln -sf ../init.d/udev_retry ${EXTDIR}/rcS.d/S45udev_retry 86 ln -sf ../init.d/cleanfs ${EXTDIR}/rcS.d/S50cleanfs 87 ln -sf ../init.d/console ${EXTDIR}/rcS.d/S70console 88 ln -sf ../init.d/localnet ${EXTDIR}/rcS.d/S80localnet 89 89 if [ ! -f ${EXTDIR}/sysconfig/createfiles ]; then install -m ${CONFMODE} sysconfig/createfiles ${EXTDIR}/sysconfig/; fi 90 90 if [ ! -f ${EXTDIR}/sysconfig/modules ]; then install -m ${CONFMODE} sysconfig/modules ${EXTDIR}/sysconfig/; fi 91 91 if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} sysconfig/rc ${EXTDIR}/sysconfig/; fi 92 92 if [ ! -f ${EXTDIR}/sysconfig/rc.site ]; then install -m ${CONFMODE} sysconfig/rc.site ${EXTDIR}/sysconfig/; fi 93 if [ -f ${EXTDIR}/inittab ]; then install -m ${CONFMODE} ${EXTDIR}/inittab ${EXTDIR}/inittab.bak; 94 install -m ${CONFMODE} etc/inittab ${EXTDIR}/ 93 95 install -m ${MODE} sysconfig/network-devices/ifup ${EXTDIR}/sysconfig/network-devices/ 94 96 install -m ${MODE} sysconfig/network-devices/ifdown ${EXTDIR}/sysconfig/network-devices/ … … 121 123 ln -sf ../init.d/swap ${EXTDIR}/rc6.d/S80swap 122 124 ln -sf ../init.d/reboot ${EXTDIR}/rc6.d/S99reboot 123 ln -sf ../init.d/mountkernfs ${EXTDIR}/rc sysinit.d/S00mountkernfs124 ln -sf ../init.d/udev ${EXTDIR}/rc sysinit.d/S10udev125 ln -sf ../init.d/swap ${EXTDIR}/rc sysinit.d/S20swap126 ln -sf ../init.d/setclock ${EXTDIR}/rc sysinit.d/S25setclock127 ln -sf ../init.d/checkfs ${EXTDIR}/rc sysinit.d/S30checkfs128 ln -sf ../init.d/mountfs ${EXTDIR}/rc sysinit.d/S40mountfs129 ln -sf ../init.d/cleanfs ${EXTDIR}/rc sysinit.d/S50cleanfs125 ln -sf ../init.d/mountkernfs ${EXTDIR}/rcS.d/S00mountkernfs 126 ln -sf ../init.d/udev ${EXTDIR}/rcS.d/S10udev 127 ln -sf ../init.d/swap ${EXTDIR}/rcS.d/S20swap 128 ln -sf ../init.d/setclock ${EXTDIR}/rcS.d/S25setclock 129 ln -sf ../init.d/checkfs ${EXTDIR}/rcS.d/S30checkfs 130 ln -sf ../init.d/mountfs ${EXTDIR}/rcS.d/S40mountfs 131 ln -sf ../init.d/cleanfs ${EXTDIR}/rcS.d/S50cleanfs 130 132 if [ ! -f ${EXTDIR}/sysconfig/rc ]; then install -m ${CONFMODE} sysconfig/rc ${EXTDIR}/sysconfig/; fi 131 133 -
bootscripts/contrib/lsb-v3/README
r59dc6e1 r010d108 2 2 3 3 The scripts contianed in this directory are a complete rewrite of the 4 boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-0 4-13). As is4 boot scripts from LFS-6.1 (updated for LFS-SVN about 2008-05-31). As is 5 5 usually the case with a rewrite, there have been many changes: 6 6 … … 17 17 18 18 LSB 3.1 Omissions - Unfortunately, this package is not completely LSB 19 compliant as it lacks install -initd and remove-initd programs. The current19 compliant as it lacks install_initd and remove_initd programs. The current 20 20 popular flavor of these programs is written in Python, which, as you should 21 21 know, is not installed until BLFS. I began work on a bash implementation, 22 22 and have provided the needed functions to parse the LSB headers in the 23 23 manage-functions script (insalled by default into /lib/lsb). Unfortunately, 24 I have yet to complete the actual install -initd and remove-initd scripts,25 however, I do have an almost complete install-initd kept locally. I am 26 currently working on a separate script to completely rewrite the symlinks 27 should LFS default values not prove sufficient when working with scripts in 28 the wild. I have not included either here because they are not yet complete29 or thoroughly tested, and due to the development process of lfs-bootscritps, 30 would be included in a release tarball. If you would like to assist with the 31 development of these scripts, or would even just like to see what I have so 32 far, please email me privately. Of course, feel free to write your own if you 33 do not like the manage-fucntions script (or bash).24 I have yet to complete the actual install_initd and remove_initd scripts, 25 and have found bash to an unsuitable language to write a complete reorder 26 due to the ammount of time for recursive funtions and loops to complete. 27 Dan Nicholson has began work on initd-tools, a C implementaion of 28 install_initd and remove_initd. At the time of writing (20080830) the 29 programs themselves are not yet functional, however, the libraries used 30 to parse the scripts and provide the dependency order are working as 31 expected. I would expect a completely standards compliant set of programs, 32 written in C very soon. Dans work can be viewed via git-web at 33 http://gitweb.dwcab.com/?p=initd-tools.git;a=summary . 34 34 35 35 Distribution Independent - this original goal for the LFS scripts has been … … 63 63 is configurable in the /etc/sysconfig/rc.site file. 64 64 65 RC_BASE- The base directory for the bootscripts is now /etc, not65 Path changes - The base directory for the bootscripts is now /etc, not 66 66 /etc/rc.d. This is mostly to conform with mainstream distros, but other 67 67 boot methods do expect that /etc/init.d is the location of bootscripts. … … 70 70 flying fingers accustomed to it! Of course, this is still configurable in 71 71 /etc/sysconfig/rc.site, and if the change is too great, I'll put it back. 72 I've also removed the rcsysinit.d and replaced it with rcS.d. 72 73 73 74 LSB Functions - The previous lfs-bootscripts sourced a functions file 74 75 located at /etc/rc.d/init.d/functions. This file has been renamed 75 76 $distro-functions to segregate it from the old. The name is configurable 76 by the rc.site configuration file. Both old and new bootscripts can be 77 used simultaneously in a SYS-V setup (with proper symlinks in place). 78 LSB defined functions are used where possible, but the $distro-functions file 79 provides, easy to use wraper functions that 80 start/stop/reload/force-reload/restart programs, evaluate the numerical 81 LSB return values, and print status messages to the screen. Both LFS 82 functions and LSB functions are documented directly in the scritps located 83 at /etc/init.d/$distro-functions and /lib/lsb/init-functions respectively. 77 by the rc.site configuration file. LSB defined functions are used where 78 possible, but the $distro-functions file provides, easy to use wraper 79 functions that start/stop/reload/force-reload/restart programs, evaluate 80 the numerical LSB return values, and print status messages to the screen. 81 Both LFS functions and LSB functions are documented directly in the scritps 82 located at /etc/init.d/$distro-functions and /lib/lsb/init-functions 83 respectively. 84 84 85 85 Pretier - Yeah, I just couldn't handle all the grey text... By default, -
bootscripts/contrib/lsb-v3/init.d/checkfs
r59dc6e1 r010d108 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Checks local filesystems before mounting. -
bootscripts/contrib/lsb-v3/init.d/cleanfs
r59dc6e1 r010d108 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Cleans temporary directories early in the boot process. -
bootscripts/contrib/lsb-v3/init.d/console
r59dc6e1 r010d108 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Sets up a localised console. -
bootscripts/contrib/lsb-v3/init.d/lfs-functions
r59dc6e1 r010d108 81 81 log_success_msg "Running with PID(s) ${pidlist}" 82 82 else 83 84 83 log_warning_msg "Not running!" 85 84 fi -
bootscripts/contrib/lsb-v3/init.d/localnet
r59dc6e1 r010d108 7 7 # Should-Start: 8 8 # Required-Stop: 9 # Should-Stop: halt reboot10 # Default-Start: sysinit 0 611 # Default-Stop: 9 # Should-Stop: 10 # Default-Start: S 11 # Default-Stop: 0 6 12 12 # Short-Description: Starts the local network. 13 13 # Description: Sets the hostname of the machine and starts the -
bootscripts/contrib/lsb-v3/init.d/modules
r59dc6e1 r010d108 4 4 ### BEGIN INIT INFO 5 5 # Provides: modules 6 # Required-Start: mountkernfs 7 # Should-Start: sysctl6 # Required-Start: mountkernfs sysctl 7 # Should-Start: 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Loads required modules. -
bootscripts/contrib/lsb-v3/init.d/mountfs
r59dc6e1 r010d108 6 6 # Required-Start: udev checkfs 7 7 # Should-Start: 8 # Required-Stop: swap8 # Required-Stop: localnet 9 9 # Should-Stop: 10 # Default-Start: sysinit 0 611 # Default-Stop: 12 # Short-Description: Mounts and unmounts all local filesystems.10 # Default-Start: S 11 # Default-Stop: 0 6 12 # Short-Description: Mounts/unmounts local filesystems defined in /etc/fstab. 13 13 # Description: Remounts root filesystem read/write and mounts all 14 14 # remaining local filesystems defined in /etc/fstab on 15 # start. R mounts root filesystem read-only and unmounts15 # start. Remounts root filesystem read-only and unmounts 16 16 # remaining filesystems on stop. 17 17 # X-LFS-Default-Start: S40 -
bootscripts/contrib/lsb-v3/init.d/mountkernfs
r59dc6e1 r010d108 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Mounts /sys and /proc virtual (kernel) filesystems. -
bootscripts/contrib/lsb-v3/init.d/network
r59dc6e1 r010d108 7 7 # Should-Start: 8 8 # Required-Stop: $syslog $local_fs swap localnet 9 # Should-Stop: halt reboot9 # Should-Stop: 10 10 # Default-Start: 3 4 5 11 11 # Default-Stop: 0 1 2 6 … … 32 32 continue 33 33 fi 34 35 34 IN_BOOT=1 ${NETWORK_DEVICES}/ifup ${interface} 36 35 done -
bootscripts/contrib/lsb-v3/init.d/rc
r59dc6e1 r010d108 16 16 17 17 # Do not use the RUNLEVEL and PREVLEVEL variables provided by init so 18 # that they can be modified and alternate directories ( sysinit) can18 # that they can be modified and alternate directories (S) can 19 19 # be used without affecting init 20 20 runlevel="${1}" … … 27 27 28 28 # Mount a tmpfs to store boot accounting information 29 if [ "${runlevel}" = " sysinit" -a "${TEMPFS_MOUNT}" != "" ]; then29 if [ "${runlevel}" = "S" -a "${TEMPFS_MOUNT}" != "" ]; then 30 30 mount -n -t tmpfs tmpfs "${TEMPFS_MOUNT}" -o mode=600 31 31 fi 32 32 33 33 # Provide an interactive prompt (if requested) 34 if [ "${runlevel}" = " sysinit" -a "${iprompt}" = "yes" ]; then34 if [ "${runlevel}" = "S" -a "${iprompt}" = "yes" ]; then 35 35 # ash does not accept t and n flags for read 36 36 ls -l /bin/sh | grep "/ash" … … 67 67 68 68 # Source the interactive state file if it exists 69 if [ "${runlevel}" != " sysinit" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then69 if [ "${runlevel}" != "S" -a -f "${TEMPFS_MOUNT}/.interactive-start" ]; then 70 70 . "${TEMPFS_MOUNT}/.interactive-start" 71 71 fi 72 72 73 # Prompt for interactive startup after completing sysinit74 if [ "${interactive}" = "I" -a "${runlevel}" != " sysinit" -a \73 # Prompt for interactive startup after completing S 74 if [ "${interactive}" = "I" -a "${runlevel}" != "S" -a \ 75 75 "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then 76 76 echo -n -e "Proceed with interactive starup of runlevel " … … 105 105 script=${link#$RC_BASE/rc$runlevel.d/K[0-9][0-9]} 106 106 prev_start=$RC_BASE/rc$prevlevel.d/S[0-9][0-9]$script 107 sysinit_start=$RC_BASE/rcsysinit.d/S[0-9][0-9]$script107 S_start=$RC_BASE/rcS.d/S[0-9][0-9]$script 108 108 109 109 if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then 110 if [ ! -f ${prev_start} ] && [ ! -f ${ sysinit_start} ]; then110 if [ ! -f ${prev_start} ] && [ ! -f ${S_start} ]; then 111 111 echo -e -n "${WARNING}WARNING:\n\n${link} can't be" 112 112 echo -e "${WARNING} executed because it was not" … … 181 181 # Strip apply time to the logs, strip out any color codes and dump 182 182 # the log to /var/log/boot.log 183 if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != " sysinit" ]; then183 if [ -f "${TEMPFS_MOUNT}/.bootlog" -a "${runlevel}" != "S" ]; then 184 184 # Remove any color codes from the temp log file 185 185 sed -i 's@\\033\[[0-9];[0-9][0-9]m@@g' "${TEMPFS_MOUNT}/.bootlog" … … 187 187 BTIMESPEC=$(echo `date +"%b %d %T"` `hostname`) 188 188 sed -i "s@^bootlog:@${BTIMESPEC} bootlog:@" "${TEMPFS_MOUNT}/.bootlog" 189 cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log 190 rm -f "${TEMPFS_MOUNT}/.bootlog" 189 # Don't try and write in 0 and 6, this is a 'boot' log 190 if [ "${runlevel}" != "0" -a "${runlevel}" != "6" ]; then 191 cat "${TEMPFS_MOUNT}/.bootlog" >> /var/log/boot.log 192 rm -f "${TEMPFS_MOUNT}/.bootlog" 193 fi 191 194 fi 192 195 -
bootscripts/contrib/lsb-v3/init.d/sendsignals
r59dc6e1 r010d108 7 7 # Should-Start: 8 8 # Required-Stop: $local_fs swap localnet 9 # Should-Stop: halt reboot10 # Default-Start: 0 611 # Default-Stop: 9 # Should-Stop: 10 # Default-Start: 11 # Default-Stop: 0 6 12 12 # Short-Description: Attempts to kill remaining processes. 13 13 # Description: Attempts to kill remaining processes. -
bootscripts/contrib/lsb-v3/init.d/setclock
r59dc6e1 r010d108 4 4 ### BEGIN INIT INFO 5 5 # Provides: $time 6 # Required-Start: udev swap6 # Required-Start: modules 7 7 # Should-Start: 8 # Required-Stop: $ network $syslog $local_fs9 # Should-Stop: halt reboot10 # Default-Start: sysinit11 # Default-Stop: 8 # Required-Stop: $syslog 9 # Should-Stop: 10 # Default-Start: S 11 # Default-Stop: 12 12 # Short-Description: Stores and restores time from the hardware clock 13 13 # Description: On boot, system time is obtained from hwclock. The -
bootscripts/contrib/lsb-v3/init.d/swap
r59dc6e1 r010d108 4 4 ### BEGIN INIT INFO 5 5 # Provides: swap 6 # Required-Start: udev6 # Required-Start: modules 7 7 # Should-Start: 8 8 # Required-Stop: localnet 9 # Should-Stop: halt reboot10 # Default-Start: sysinit 0 611 # Default-Stop: 9 # Should-Stop: 10 # Default-Start: S 11 # Default-Stop: 0 6 12 12 # Short-Description: Mounts and unmounts swap partitions. 13 13 # Description: Mounts and unmounts swap partitions defined in -
bootscripts/contrib/lsb-v3/init.d/sysctl
r59dc6e1 r010d108 4 4 ### BEGIN INIT INFO 5 5 # Provides: sysctl 6 # Required-Start: udev6 # Required-Start: mountkernfs 7 7 # Should-Start: 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Makes changes to the proc filesystem -
bootscripts/contrib/lsb-v3/init.d/sysklogd
r59dc6e1 r010d108 6 6 # Required-Start: localnet 7 7 # Should-Start: 8 # Required-Stop: sendsignals $local_fs swap9 # Should-Stop: halt reboot8 # Required-Stop: $local_fs 9 # Should-Stop: 10 10 # Default-Start: 2 3 4 5 11 11 # Default-Stop: 0 1 6 -
bootscripts/contrib/lsb-v3/init.d/udev
r59dc6e1 r010d108 4 4 ### BEGIN INIT INFO 5 5 # Provides: udev 6 # Required-Start: mo untkernfs6 # Required-Start: modules 7 7 # Should-Start: 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Populated /dev with device nodes. -
bootscripts/contrib/lsb-v3/init.d/udev_retry
r59dc6e1 r010d108 8 8 # Required-Stop: 9 9 # Should-Stop: 10 # Default-Start: sysinit10 # Default-Start: S 11 11 # Default-Stop: 12 12 # Short-Description: Replays failed uevents and creates additonal devices.
Note:
See TracChangeset
for help on using the changeset viewer.