Changeset 890ef7c for bootscripts/lfs
- Timestamp:
- 05/24/2019 07:06:18 PM (5 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, 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:
- e8c6e1f
- Parents:
- 6b54807
- Location:
- bootscripts/lfs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/lfs/lib/services/init-functions
r6b54807 r890ef7c 41 41 42 42 # Use a colored prefix 43 BMPREFIX=" "44 SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} "45 FAILURE_PREFIX="${FAILURE}*****${NORMAL} "46 WARNING_PREFIX="${WARNING} *** ${NORMAL} "47 SKIP_PREFIX="${INFO} S ${NORMAL}"43 BMPREFIX=" " 44 SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} " 45 FAILURE_PREFIX="${FAILURE}*****${NORMAL} " 46 WARNING_PREFIX="${WARNING} *** ${NORMAL} " 47 SKIP_PREFIX="${INFO} S ${NORMAL}" 48 48 49 49 SUCCESS_SUFFIX="${BRACKET}[${SUCCESS} OK ${BRACKET}]${NORMAL}" -
bootscripts/lfs/lib/services/ipv4-static
r6b54807 r890ef7c 48 48 up) 49 49 if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP}/)" = "" ]; then 50 51 # Cosmetic output52 if ! $(echo ${SERVICE} | grep -q " "); then53 log_info_msg2 "\n" # Terminate the previous message54 fi55 56 50 log_info_msg "Adding IPv4 address ${IP} to the ${1} interface..." 57 51 ip addr add ${args} dev ${1} -
bootscripts/lfs/sbin/ifup
r6b54807 r890ef7c 8 8 # Kevin P. Fleming - kpfleming@linuxfromscratch.org 9 9 # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org 10 # DJ Lucas - dj@linuxfromscratch.org 10 11 # 11 12 # Version : LFS 7.7 … … 19 20 up() 20 21 { 22 log_info_msg "Bringing up the ${1} interface..." 23 21 24 if ip link show $1 > /dev/null 2>&1; then 22 25 link_status=`ip link show $1` … … 29 32 30 33 else 31 log_failure_msg " \nInterface ${IFACE} doesn't exist."34 log_failure_msg "Interface ${IFACE} doesn't exist." 32 35 exit 1 33 36 fi 37 38 evaluate_retval 34 39 } 35 40 … … 73 78 . /lib/lsb/init-functions 74 79 75 log_info_msg "Bringing up the ${1} interface... "76 77 80 if [ ! -r "${file}" ]; then 78 log_failure_msg 2 "${file} is missing or cannot be accessed."81 log_failure_msg "Unable to bring up ${1} interface! ${file} is missing or cannot be accessed." 79 82 exit 1 80 83 fi 81 84 82 . $file85 . $file 83 86 84 87 if [ "$IFACE" = "" ]; then 85 log_failure_msg 2 "${file} does not define an interface [IFACE]."88 log_failure_msg "Unable to bring up ${1} interface! ${file} does not define an interface [IFACE]." 86 89 exit 1 87 90 fi … … 90 93 # is not set to yes 91 94 if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then 92 log_skip_msg93 95 exit 0 96 fi 97 98 # Bring up the interface 99 if [ "$VIRTINT" != "yes" ]; then 100 up ${IFACE} 94 101 fi 95 102 … … 111 118 done 112 119 113 # Bring up the interface and any components 114 for I in $IFACE $INTERFACE_COMPONENTS; do up $I; done 120 # Set link up virtual interfaces 121 if [ "${VIRTINT}" == "yes" ]; then 122 up ${IFACE} 123 fi 124 125 # Bring up any additional interface components 126 for I in $INTERFACE_COMPONENTS; do up $I; done 115 127 116 128 # Set MTU if requested. Check if MTU has a "good" value. … … 128 140 if [ -n "${GATEWAY}" ]; then 129 141 if ip route | grep -q default; then 130 log_ skip_msg "\nGateway already setup; skipping."142 log_warning_msg "Gateway already setup; skipping." 131 143 else 132 log_info_msg " Setting up default gateway..."144 log_info_msg "Adding default gateway ${GATEWAY} to the ${IFACE} interface..." 133 145 ip route add default via ${GATEWAY} dev ${IFACE} 134 146 evaluate_retval -
bootscripts/lfs/sysconfig/rc.site
r6b54807 r890ef7c 28 28 # Use a colored prefix 29 29 # These values, if specified here, override the defaults 30 #BMPREFIX=" "31 #SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} "32 #FAILURE_PREFIX="${FAILURE}*****${NORMAL} "33 #WARNING_PREFIX="${WARNING} *** ${NORMAL} "30 #BMPREFIX=" " 31 #SUCCESS_PREFIX="${SUCCESS} * ${NORMAL} " 32 #FAILURE_PREFIX="${FAILURE}*****${NORMAL} " 33 #WARNING_PREFIX="${WARNING} *** ${NORMAL} " 34 34 35 35 # Manually seet the right edge of message output (characters)
Note:
See TracChangeset
for help on using the changeset viewer.