Changeset 010d108 for bootscripts/contrib/lsb-v3/init.d/rc
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.