Changeset 530d929 for bootscripts/lfs/sbin/ifup
- Timestamp:
- 06/02/2019 11:21:32 AM (5 years ago)
- Branches:
- multilib-10.1
- Children:
- d8a8713
- Parents:
- 4a8482f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bootscripts/lfs/sbin/ifup
r4a8482f r530d929 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
Note:
See TracChangeset
for help on using the changeset viewer.