|
Lines 936-946
case "$BOOTPROTO$SKIP_MAIN_PART" in
Link Here
|
| 936 |
;; |
936 |
;; |
| 937 |
ifstatus) |
937 |
ifstatus) |
| 938 |
if is_iface_up $INTERFACE ; then |
938 |
if is_iface_up $INTERFACE ; then |
| 939 |
message_if_not_run_from_rc "$INTERFACE is up" |
939 |
message "`printf " %-9s is up" "$INTERFACE"`" |
| 940 |
message_if_not_run_from_rc "$(ip addr show $INTERFACE)" |
940 |
message_if_not_run_from_rc "$(ip addr show $INTERFACE)" |
| 941 |
while read a b c d e f g h i; do |
|
|
| 942 |
message "`printf " %-9s IP address: %s" "$i" "$d"`" |
| 943 |
done < <(ip -o -4 addr show $INTERFACE) |
| 944 |
ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
941 |
ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
| 945 |
retcode=$R_SUCCESS |
942 |
retcode=$R_SUCCESS |
| 946 |
else |
943 |
else |
|
Lines 1095-1101
case "$BOOTPROTO$SKIP_MAIN_PART" in
Link Here
|
| 1095 |
ADDRCOUNT=$(($ADDRCOUNT + 1)) |
1092 |
ADDRCOUNT=$(($ADDRCOUNT + 1)) |
| 1096 |
done |
1093 |
done |
| 1097 |
fi |
1094 |
fi |
|
|
1095 |
|
| 1098 |
ifup-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
1096 |
ifup-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
|
|
1097 |
|
| 1098 |
# |
| 1099 |
# OK, everything is set up here .. lets check the state |
| 1100 |
# |
| 1101 |
|
| 1102 |
# - link |
| 1103 |
link_ready_wait "$INTERFACE" "${LINK_READY_WAIT:-$((WAIT_FOR_INTERFACES/2))}" |
| 1104 |
link_ret=$? |
| 1105 |
if [ "$retcode" = "$R_SUCCESS" ] ; then |
| 1106 |
# do not override codes when already set (e.g. $R_DHCP_BG) |
| 1107 |
case "$link_ret" in |
| 1108 |
1|2|3) retcode=$R_NOTRUNNING ;; |
| 1109 |
esac |
| 1110 |
fi |
| 1111 |
|
| 1112 |
# - dad |
| 1113 |
if [ "$retcode" = "$R_SUCCESS" -a -d /proc/sys/net/ipv6 ] ; then |
| 1114 |
IPV6_DAD_WAIT=${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/5))} |
| 1115 |
ipv6_addr_dad_wait "$INTERFACE" "$IPV6_DAD_WAIT" |
| 1116 |
dad_ret=$? |
| 1117 |
case $dad_ret in |
| 1118 |
1|2) retcode=$R_NOTRUNNING ;; |
| 1119 |
3) retcode=$R_DHCP_BG ;; |
| 1120 |
esac |
| 1121 |
fi |
| 1122 |
|
| 1099 |
;; |
1123 |
;; |
| 1100 |
ifdown) |
1124 |
ifdown) |
| 1101 |
case "$BOOTPROTO" in |
1125 |
case "$BOOTPROTO" in |
|
Lines 1117-1129
case "$BOOTPROTO$SKIP_MAIN_PART" in
Link Here
|
| 1117 |
;; |
1141 |
;; |
| 1118 |
ifstatus) |
1142 |
ifstatus) |
| 1119 |
if is_iface_up $INTERFACE ; then |
1143 |
if is_iface_up $INTERFACE ; then |
| 1120 |
message_if_not_run_from_rc "$INTERFACE is up" |
|
|
| 1121 |
message_if_not_run_from_rc "$(ip addr show $INTERFACE)" |
1144 |
message_if_not_run_from_rc "$(ip addr show $INTERFACE)" |
| 1122 |
while read a b c d e f g h i; do |
1145 |
if [ "$RUN_FROM_RC" = "yes" ]; then |
| 1123 |
message "`printf " %-9s IP address: %s" "$i" "$d"`" |
1146 |
while read a b c d e f g h i; do |
| 1124 |
done < <(ip -o -4 addr show $INTERFACE) |
1147 |
message "`printf " %-9s IP address: %s" "$i" "$d"`" |
|
|
1148 |
done < <(ip -o -4 addr show $INTERFACE) |
| 1149 |
while read a b c d e f g h i; do |
| 1150 |
test "$f" = "global" || continue |
| 1151 |
message "`printf " %-9s IP address: %s" "$b" "$d"`" |
| 1152 |
done < <(ip -o -6 addr show $INTERFACE) |
| 1153 |
fi |
| 1154 |
|
| 1125 |
ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
1155 |
ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS} |
|
|
1156 |
|
| 1126 |
retcode=$R_SUCCESS |
1157 |
retcode=$R_SUCCESS |
|
|
1158 |
dad_ret=0 |
| 1159 |
link_ret=0 |
| 1160 |
|
| 1161 |
# Check the link |
| 1162 |
if [ -n "$LINK_READY_WAIT" -a $((LINK_READY_WAIT)) -gt 0 ] ; then |
| 1163 |
# check the link |
| 1164 |
link_ready_check "$INTERFACE" || link_ret=$? |
| 1165 |
case $link_ret in |
| 1166 |
1|2|3) retcode=$R_NOTRUNNING ;; |
| 1167 |
esac |
| 1168 |
fi |
| 1169 |
|
| 1170 |
# Check ipv6 dad |
| 1171 |
if [ "$retcode" = "$R_SUCCESS" -a -d /proc/sys/net/ipv6 ] ; then |
| 1172 |
IPV6_DAD_WAIT=${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/5))} |
| 1173 |
if [ $((IPV6_DAD_WAIT)) -gt 0 ] ; then |
| 1174 |
ipv6_addr_dad_check "$INTERFACE" |
| 1175 |
dad_ret=$? |
| 1176 |
fi |
| 1177 |
fi |
| 1178 |
|
| 1179 |
# OK, now show the results |
| 1180 |
case $link_ret in |
| 1181 |
0) |
| 1182 |
# in link problem cases, IPv6 dad status is not yet interesting |
| 1183 |
msg="is up" |
| 1184 |
case $dad_ret in |
| 1185 |
2) msg="is up, but ipv6 duplicate address check failed";; |
| 1186 |
3) msg="is up, but has tentative ipv6 address";; |
| 1187 |
esac |
| 1188 |
message "`printf " %-9s $msg" "$INTERFACE"`" ;; |
| 1189 |
1) message "`printf " %-9s is not up" "$INTERFACE"`" ;; |
| 1190 |
2) message "`printf " %-9s is dormant" "$INTERFACE"`" ;; |
| 1191 |
3) message "`printf " %-9s has no carrier" "$INTERFACE"`" ;; |
| 1192 |
esac |
| 1127 |
else |
1193 |
else |
| 1128 |
# message_if_not_run_from_rc "$INTERFACE is down" |
1194 |
# message_if_not_run_from_rc "$INTERFACE is down" |
| 1129 |
message "`printf " %-9s is down" $INTERFACE`" |
1195 |
message "`printf " %-9s is down" $INTERFACE`" |
| 1130 |
- |
|
|