View | Details | Raw Unified | Return to bug 697929
Collapse All | Expand All

(-)a/config/ifcfg.template (+22 lines)
Lines 167-172 LLADDR= Link Here
167
#
167
#
168
LINK_OPTIONS=
168
LINK_OPTIONS=
169
169
170
## Type:        integer
171
## Default:     0
172
#
173
# The number of seconds to wait for link to become useable / ready.
174
# Default is 0, causing to not wait for a ready link (0), because link
175
# detection can't be enabled in all cases (e.g. bridges without ports).
176
# Please use per interface settings to enable it.
177
#
178
LINK_READY_WAIT=
179
180
## Type:        integer
181
## Default:     ""
182
#
183
# The number of seconds to wait for the end of IPv6 duplicate address
184
# detection in ifup.
185
# Default is to use WAIT_FOR_INTERFACES/2 seconds in normal ifup runs.
186
# When ifup is called by /etc/init.d/network at boot time, the check
187
# is done, but /etc/init.d/network waits WAIT_FOR_INTERFACES seconds
188
# for all interfaces togerther. Set to 0 to disable it.
189
#
190
IPV6_DAD_WAIT=
191
170
## Type:    string
192
## Type:    string
171
## Default: ""
193
## Default: ""
172
#
194
#
(-)a/config/sysconfig.config-network (-5 / +10 lines)
Lines 136-154 MANDATORY_DEVICES="" Link Here
136
WAIT_FOR_INTERFACES="30"
136
WAIT_FOR_INTERFACES="30"
137
137
138
## Type:        integer
138
## Type:        integer
139
## Default:     ""
139
## Default:     0
140
#
140
#
141
# The number of seconds to wait for link to become useable / ready.
141
# The number of seconds to wait for link to become useable / ready.
142
# Default is to use WAIT_FOR_INTERFACES/2 seconds. Set to 0 to disable.
142
# Default is 0, causing to not wait for a ready link (0), because link
143
# detection can't be enabled in all cases (e.g. bridges without ports).
144
# Please use per interface settings to enable it.
143
#
145
#
144
LINK_READY_WAIT=""
146
LINK_READY_WAIT=0
145
147
146
## Type:        integer
148
## Type:        integer
147
## Default:     ""
149
## Default:     ""
148
#
150
#
149
# The number of seconds to wait for the end of IPv6 duplicate address
151
# The number of seconds to wait for the end of IPv6 duplicate address
150
# detection. Default is to use WAIT_FOR_INTERFACES/5 seconds. Set to
152
# detection in ifup.
151
# 0 to disable.
153
# Default is to use WAIT_FOR_INTERFACES/2 seconds in normal ifup runs.
154
# When ifup is called by /etc/init.d/network at boot time, the check
155
# is done, but /etc/init.d/network waits WAIT_FOR_INTERFACES seconds
156
# for all interfaces togerther. Set to 0 to disable it.
152
#
157
#
153
IPV6_DAD_WAIT=""
158
IPV6_DAD_WAIT=""
154
159
(-)a/scripts/functions (-19 / +24 lines)
Lines 128-146 link_ready_check () { Link Here
128
	return 0
128
	return 0
129
}
129
}
130
130
131
link_ready_wait () {
132
	local iface=$1
133
	local wsecs=${2:-0}
134
	local uwait=25000
135
	local loops=$(((wsecs * 100000) / $uwait))
136
	local loop ret=0
137
	for((loop=0; loop < $loops; loop++)) ; do
138
		link_ready_check "$iface" ; ret=$?
139
		test $ret -ne 0 && usleep $uwait || break
140
	done
141
	return $ret
142
}
143
144
ipv6_addr_dad_check()
131
ipv6_addr_dad_check()
145
{
132
{
146
	local iface="$1" word i
133
	local iface="$1" word i
Lines 171-186 ipv6_addr_dad_check() Link Here
171
	return $R_SUCCESS
158
	return $R_SUCCESS
172
}
159
}
173
160
161
link_ready_wait ()
162
{
163
	local iface=$1
164
	local -i wsecs=${2:-0}
165
	local -i uwait=25000
166
	local -i loops=$(((wsecs * 100000) / $uwait))
167
	local -i loop=0 ret=0
168
169
	link_ready_check "$iface" ; ret=$?
170
	while ((ret != 0 && loop++ < loops)) ; do
171
		usleep $uwait
172
		link_ready_check "$iface" ; ret=$?
173
	done
174
	return $ret
175
}
176
174
ipv6_addr_dad_wait()
177
ipv6_addr_dad_wait()
175
{
178
{
176
	local iface=$1
179
	local iface=$1
177
	local wsecs=${2:-0}
180
	local -i wsecs=${2:-0}
178
	local uwait=25000
181
	local -i uwait=25000
179
	local loops=$(((wsecs * 100000) / $uwait))
182
	local -i loops=$(((wsecs * 100000) / $uwait))
180
	local loop ret=0
183
	local -i loop=0 ret=0
181
	for((loop=0; loop < $loops; loop++)) ; do
184
185
	ipv6_addr_dad_check "$iface" ; ret=$?
186
	while ((ret == 3 && loop++ < loops)) ; do
187
		usleep $uwait
182
		ipv6_addr_dad_check "$iface" ; ret=$?
188
		ipv6_addr_dad_check "$iface" ; ret=$?
183
		test $ret -eq 3 && usleep $uwait || break
184
	done
189
	done
185
	return $ret
190
	return $ret
186
}
191
}
(-)a/scripts/ifup (-37 / +84 lines)
Lines 96-101 test "$1" = "-o" && shift Link Here
96
OPTIONS=$@
96
OPTIONS=$@
97
MODE=manual
97
MODE=manual
98
HOTPLUG=no
98
HOTPLUG=no
99
BOOTING=no
99
CONTROL_IFPLUGD=yes # Start/Stop ifplugd?
100
CONTROL_IFPLUGD=yes # Start/Stop ifplugd?
100
# Don't log messages from ifstatus in syslog by default (Bug 261350). This
101
# Don't log messages from ifstatus in syslog by default (Bug 261350). This
101
# overwrites the config variable /etc/sysconfig/network/config:USE_SYSLOG
102
# overwrites the config variable /etc/sysconfig/network/config:USE_SYSLOG
Lines 103-109 export DONT_USE_SYSLOG=no Link Here
103
test "$SCRIPTNAME" == ifstatus && DONT_USE_SYSLOG=yes
104
test "$SCRIPTNAME" == ifstatus && DONT_USE_SYSLOG=yes
104
while [ $# -gt 0 ]; do
105
while [ $# -gt 0 ]; do
105
	case $1 in
106
	case $1 in
106
		boot|onboot) MODE=auto ;;
107
		boot|onboot) MODE=auto ; BOOTING=yes ;;
107
		auto)        MODE=auto ;;
108
		auto)        MODE=auto ;;
108
		hotplug)     MODE=auto
109
		hotplug)     MODE=auto
109
		             HOTPLUG=yes ;;
110
		             HOTPLUG=yes ;;
Lines 423-429 setexitstate () { Link Here
423
			esac
424
			esac
424
			commit_cached_config_data $INTERFACE
425
			commit_cached_config_data $INTERFACE
425
			commit_cached_config_data $INTERFACE PFX=ifup-
426
			commit_cached_config_data $INTERFACE PFX=ifup-
426
			;;
427
		;;
427
		ifdown)
428
		ifdown)
428
			test "$HOTPLUG" = yes && RET_STATE=removed
429
			test "$HOTPLUG" = yes && RET_STATE=removed
429
			test "$RUN_FROM_RC" = yes && RET_STATE=removed
430
			test "$RUN_FROM_RC" = yes && RET_STATE=removed
Lines 447-453 setexitstate () { Link Here
447
			commit_cached_config_data $INTERFACE
448
			commit_cached_config_data $INTERFACE
448
			delete_from_cached_config_data '*' '' $INTERFACE PFX=ifup-
449
			delete_from_cached_config_data '*' '' $INTERFACE PFX=ifup-
449
			commit_cached_config_data $INTERFACE PFX=ifup-
450
			commit_cached_config_data $INTERFACE PFX=ifup-
450
			;;
451
		;;
451
	esac
452
	esac
452
}
453
}
453
454
Lines 501-506 DEVNAME= Link Here
501
if [ -n "$VENDORID$PRODUCTID" -a "$BUSNAME" = pci -a -x /sbin/lspci ] ; then
502
if [ -n "$VENDORID$PRODUCTID" -a "$BUSNAME" = pci -a -x /sbin/lspci ] ; then
502
	DEVNAME=`lspci -d $VENDORID:$PRODUCTID 2>/dev/null | sed -n 1p`
503
	DEVNAME=`lspci -d $VENDORID:$PRODUCTID 2>/dev/null | sed -n 1p`
503
	DEVNAME=${DEVNAME#*: }
504
	DEVNAME=${DEVNAME#*: }
505
	if [ "$RUN_FROM_RC" = yes ] ; then
506
		DEVNAME=${DEVNAME%%[(\[]*}
507
		DEVNAME=${DEVNAME:0:45}
508
		NAME=${NAME:0:45}
509
	fi
504
elif [ "$BUSNAME" = pcmcia ] ; then
510
elif [ "$BUSNAME" = pcmcia ] ; then
505
	DEVNAME=`cat /sys/class/net/$INTERFACE/device/prod_id* 2>/dev/null`
511
	DEVNAME=`cat /sys/class/net/$INTERFACE/device/prod_id* 2>/dev/null`
506
fi
512
fi
Lines 1037-1045 case "$BOOTPROTO$SKIP_MAIN_PART" in Link Here
1037
								# else
1043
								# else
1038
								#	message_n "`printf "IP/Netmask: %s / %s  " $IPADDR $NETMASK`"
1044
								#	message_n "`printf "IP/Netmask: %s / %s  " $IPADDR $NETMASK`"
1039
								fi
1045
								fi
1040
								if [ "$INTERFACETYPE" == bond ] ; then
1041
									message_n " as bonding master"
1042
								fi
1043
								message " "
1046
								message " "
1044
								;;
1047
								;;
1045
							esac
1048
							esac
Lines 1096-1123 case "$BOOTPROTO$SKIP_MAIN_PART" in Link Here
1096
				ifup-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
1099
				ifup-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
1097
1100
1098
				#
1101
				#
1099
				# OK, everything is set up here .. lets check the state
1102
				# OK, all setup done ... check the state now
1103
				#
1104
				# Do not override codes when already set (e.g. $R_DHCP_BG);
1105
				# it is the final action to check the link / dad status.
1106
				#
1107
				# When called from rcnetwork, do not wait as rcnetwork does.
1100
				#
1108
				#
1109
				dad_ret=0
1110
				link_ret=0
1101
1111
1102
				# - link
1112
				# - check the link (carrier, ...)
1103
				link_ready_wait "$INTERFACE" "${LINK_READY_WAIT:-$((WAIT_FOR_INTERFACES/2))}"
1113
				#   per interface setting, disabled by default
1104
				link_ret=$?
1105
				if [ "$retcode" = "$R_SUCCESS" ] ; then
1114
				if [ "$retcode" = "$R_SUCCESS" ] ; then
1106
					# do not override codes when already set (e.g. $R_DHCP_BG)
1115
					if [ $((LINK_READY_WAIT)) -gt 0 ] ; then
1107
					case "$link_ret" in
1116
						if [ "$BOOTING" = yes -a "$RUN_FROM_RC" = yes ] ; then
1108
					1|2|3) retcode=$R_NOTRUNNING ;;
1117
							link_ready_check "$INTERFACE"
1109
					esac
1118
							link_ret=$?
1119
							test "$link_ret" && retcode=$R_DHCP_BG
1120
						else
1121
							link_ready_wait "$INTERFACE" "${LINK_READY_WAIT}"
1122
							link_ret=$?
1123
							test "$link_ret" && retcode=$R_NOTRUNNING
1124
						fi
1125
					fi
1110
				fi
1126
				fi
1111
1127
1112
				# - dad
1128
				# - check ipv6 dad
1113
				if [ "$retcode" = "$R_SUCCESS" -a -d /proc/sys/net/ipv6 ] ; then
1129
				#   global (and per interface) setting, enabled by default
1114
					IPV6_DAD_WAIT=${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/5))}
1130
				#   when the link isn't ready yet, the addresses are marked tentative
1115
					ipv6_addr_dad_wait "$INTERFACE" "$IPV6_DAD_WAIT"
1131
				#   dad starts when the link becomes ready and we wait until success
1116
					dad_ret=$?
1132
				#   or dad failure.
1117
					case $dad_ret in
1133
				if [ "$retcode" = "$R_SUCCESS" ] ; then
1118
					1|2) retcode=$R_NOTRUNNING ;;
1134
					IPV6_DAD_WAIT=${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/2))}
1119
					3)   retcode=$R_DHCP_BG    ;;
1135
					if [ $((IPV6_DAD_WAIT)) -gt 0 ] ; then
1120
					esac
1136
						if [ "$BOOTING" = yes -a "$RUN_FROM_RC" = yes ] ; then
1137
							ipv6_addr_dad_check "$INTERFACE"
1138
							dad_ret=$?
1139
						else
1140
							ipv6_addr_dad_wait "$INTERFACE" "${IPV6_DAD_WAIT}"
1141
							dad_ret=$?
1142
						fi
1143
						case $dad_ret in
1144
							1|2) retcode=$R_NOTRUNNING ;;
1145
							3)   retcode=$R_DHCP_BG    ;;
1146
						esac
1147
					fi
1148
				fi
1149
1150
				# inform ifstatus to update status connecting flag
1151
				if [ $retcode -eq $R_DHCP_BG -a \( $link_ret -ne 0 -o $dad_ret -ne 0 \) ] ; then
1152
					write_cached_config_data verify status $INTERFACE
1121
				fi
1153
				fi
1122
1154
1123
				;;
1155
				;;
Lines 1154-1178 case "$BOOTPROTO$SKIP_MAIN_PART" in Link Here
1154
1186
1155
					ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
1187
					ifstatus-route $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
1156
1188
1157
					retcode=$R_SUCCESS
1158
					dad_ret=0
1189
					dad_ret=0
1159
					link_ret=0
1190
					link_ret=0
1191
					retcode=$R_SUCCESS
1160
1192
1161
					# Check the link
1193
					# - check the link
1162
					if [ -n "$LINK_READY_WAIT" -a $((LINK_READY_WAIT)) -gt 0 ] ; then
1194
					if [ $((LINK_READY_WAIT)) -gt 0 ] ; then
1163
						# check the link
1195
						link_ready_check "$INTERFACE"
1164
						link_ready_check "$INTERFACE" || link_ret=$?
1196
						link_ret=$?
1165
						case $link_ret in
1197
						if [ "$BOOTING" = yes -a "$RUN_FROM_RC" = yes ] ; then
1166
						1|2|3) retcode=$R_NOTRUNNING ;;
1198
							test "$link_ret" && retcode=$R_DHCP_BG
1167
						esac
1199
						else
1200
							test "$link_ret" && retcode=$R_NOTRUNNING
1201
						fi
1168
					fi
1202
					fi
1169
1203
1170
					# Check ipv6 dad
1204
					# - check ipv6 dad
1171
					if [ "$retcode" = "$R_SUCCESS" -a -d /proc/sys/net/ipv6 ] ; then
1205
					if [ "$retcode" = "$R_SUCCESS" ] ; then
1172
						IPV6_DAD_WAIT=${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/5))}
1206
						IPV6_DAD_WAIT=$((${IPV6_DAD_WAIT:-$((WAIT_FOR_INTERFACES/2))}))
1173
						if [ $((IPV6_DAD_WAIT)) -gt 0 ] ; then
1207
						if [ $((IPV6_DAD_WAIT)) -ge 0 ] ; then
1174
							ipv6_addr_dad_check "$INTERFACE"
1208
							ipv6_addr_dad_check "$INTERFACE"
1175
							dad_ret=$?
1209
							dad_ret=$?
1210
							case $dad_ret in
1211
								1|2) retcode=$R_NOTRUNNING ;;
1212
								3)   retcode=$R_DHCP_BG    ;;
1213
							esac
1176
						fi
1214
						fi
1177
					fi
1215
					fi
1178
1216
Lines 1190-1201 case "$BOOTPROTO$SKIP_MAIN_PART" in Link Here
1190
					2) message "`printf "    %-9s is dormant" "$INTERFACE"`" ;;
1228
					2) message "`printf "    %-9s is dormant" "$INTERFACE"`" ;;
1191
					3) message "`printf "    %-9s has no carrier" "$INTERFACE"`" ;;
1229
					3) message "`printf "    %-9s has no carrier" "$INTERFACE"`" ;;
1192
					esac
1230
					esac
1231
1232
					if [ "$retcode" = "$R_SUCCESS" ] ; then
1233
						v=`read_cached_config_data verify $INTERFACE`
1234
						s=`read_cached_config_data status $INTERFACE`
1235
						if test "$v" = "status" -a "$s" = "connecting" ; then
1236
							write_cached_config_data status connected $INTERFACE
1237
							commit_cached_config_data $INTERFACE
1238
						fi
1239
					fi
1193
				else
1240
				else
1194
					# message_if_not_run_from_rc "$INTERFACE is down"
1241
					# message_if_not_run_from_rc "$INTERFACE is down"
1195
					message "`printf "    %-9s is down" $INTERFACE`"
1242
					message "`printf "    %-9s is down" $INTERFACE`"
1196
					retcode=$R_NOTRUNNING
1243
					retcode=$R_NOTRUNNING
1197
					case "$STARTMODE" in
1244
					case "$STARTMODE" in
1198
					manual|off) retcode=$R_INACTIVE ;;
1245
						manual|off) retcode=$R_INACTIVE ;;
1199
					esac
1246
					esac
1200
				fi
1247
				fi
1201
				;;
1248
				;;
Lines 1221-1227 if [ "$DHCP" != yes ] ; then Link Here
1221
		test "$CHECK" = yes -a $ret != 0 && retcode=$ret
1268
		test "$CHECK" = yes -a $ret != 0 && retcode=$ret
1222
		DEP_IFACES=`get_depending_ifaces $INTERFACE`
1269
		DEP_IFACES=`get_depending_ifaces $INTERFACE`
1223
		if [ "$?" = 0 -a "$NODEPS" != yes ] ; then
1270
		if [ "$?" = 0 -a "$NODEPS" != yes ] ; then
1224
			message "`printf "    %-9s is still used from interfaces %s" \
1271
			message "`printf "    %-9s is used from interfaces %s" \
1225
			                 $INTERFACE "$DEP_IFACES"`"
1272
			                 $INTERFACE "$DEP_IFACES"`"
1226
			#for DI in $DEP_IFACES; do
1273
			#for DI in $DEP_IFACES; do
1227
			#  ifstatus $DI -o $OPTIONS
1274
			#  ifstatus $DI -o $OPTIONS
(-)a/scripts/network (-16 / +66 lines)
Lines 674-681 status() { Link Here
674
	for IFACE in $@; do
674
	for IFACE in $@; do
675
		$FAKE /sbin/ifstatus $CONFIG $IFACE -o rc $CHECK $MODE
675
		$FAKE /sbin/ifstatus $CONFIG $IFACE -o rc $CHECK $MODE
676
		RET=$?
676
		RET=$?
677
		debug && printf "    %-9s returned %s\n" $IFACE $RET || \
677
		debug && printf "    %-9s returned %s\n" $IFACE $RET
678
		         printf "    %-9s\n" $IFACE
679
		case $RET in
678
		case $RET in
680
			$R_SUCCESS|$R_BUSY)
679
			$R_SUCCESS|$R_BUSY)
681
				# : $((R++))
680
				# : $((R++))
Lines 745-752 case "$ACTION" in Link Here
745
			done
744
			done
746
			$FAKE ifup $CONFIG $IFACE -o rc $MODE
745
			$FAKE ifup $CONFIG $IFACE -o rc $MODE
747
			RET=$?
746
			RET=$?
748
			debug && printf "    %-9s returned %s\n" $IFACE $RET || \
747
			debug && printf "    %-9s returned %s\n" $IFACE $RET
749
			         printf "    %-9s\n" $IFACE
750
			case "$RET" in
748
			case "$RET" in
751
	 			$R_SUCCESS)
749
	 			$R_SUCCESS)
752
	 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
750
	 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
Lines 831-837 case "$ACTION" in Link Here
831
829
832
			debug "Time to wait: $((WAIT_FOR_INTERFACES - TTWAIT))"
830
			debug "Time to wait: $((WAIT_FOR_INTERFACES - TTWAIT))"
833
			if [ "$NEWLINE" != yes ] ; then
831
			if [ "$NEWLINE" != yes ] ; then
834
				echo "Waiting for mandatory devices: $MANDATORY_DEVICES"
832
				echo "Waiting for mandatory devices: ${MANDATORY_DEVICES//__NSC__/}"
835
			fi
833
			fi
836
			echo -n "$((WAIT_FOR_INTERFACES - TTWAIT)) "
834
			echo -n "$((WAIT_FOR_INTERFACES - TTWAIT)) "
837
			NEWLINE=yes
835
			NEWLINE=yes
Lines 861-867 case "$ACTION" in Link Here
861
		debug SUCCESS_IFACES=$SUCCESS_IFACES
859
		debug SUCCESS_IFACES=$SUCCESS_IFACES
862
		debug MANDATORY_DEVICES=$MANDATORY_DEVICES
860
		debug MANDATORY_DEVICES=$MANDATORY_DEVICES
863
		debug FAILED=$FAILED
861
		debug FAILED=$FAILED
864
862
		debug TTWAIT=$TTWAIT
865
863
866
		if [ -z "$INTERFACE" ] ; then
864
		if [ -z "$INTERFACE" ] ; then
867
			for IFACE in $VIRTUAL_IFACES ; do
865
			for IFACE in $VIRTUAL_IFACES ; do
Lines 870-877 case "$ACTION" in Link Here
870
				done
868
				done
871
				$FAKE ifup $CONFIG $IFACE -o rc $MODE
869
				$FAKE ifup $CONFIG $IFACE -o rc $MODE
872
				RET=$?
870
				RET=$?
873
				debug && printf "    %-9s returned %s\n" $IFACE $RET || \
871
				debug && printf "    %-9s returned %s\n" $IFACE $RET
874
				         printf "    %-9s\n" $IFACE
875
				case "$RET" in
872
				case "$RET" in
876
		 			$R_SUCCESS)
873
		 			$R_SUCCESS)
877
		 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
874
		 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
Lines 886-892 case "$ACTION" in Link Here
886
					$R_NOCONFIG)
883
					$R_NOCONFIG)
887
						rc_failed 6
884
						rc_failed 6
888
						rc_status -v1
885
						rc_status -v1
889
						: $((FAILED++))
886
						# : $((FAILED++))
890
						;;
887
						;;
891
		 			$R_NOTCONFIGURED|$R_INACTIVE)
888
		 			$R_NOTCONFIGURED|$R_INACTIVE)
892
		 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
889
		 				SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
Lines 896-908 case "$ACTION" in Link Here
896
		 			*)
893
		 			*)
897
		 				rc_failed 7
894
		 				rc_failed 7
898
		 				rc_status -v1
895
		 				rc_status -v1
899
						: $((FAILED++))
896
						# : $((FAILED++))
900
		 				;;
897
		 				;;
901
				esac
898
				esac
902
				rc_reset
899
				rc_reset
903
			done
900
			done
904
		fi
905
901
902
			LINE=""
903
			NEWLINE=no
904
			while true; do
905
				debug ... still waiting for virtual devices:
906
				debug SUCCESS_IFACES=$SUCCESS_IFACES
907
				debug VIRTUAL_IFACES=$VIRTUAL_IFACES
908
909
				TMP=$VIRTUAL_IFACES
910
				VIRTUAL_IFACES=
911
				for IFACE in $TMP ; do
912
					for S in $SUCCESS_IFACES; do
913
						test "$IFACE" = "$S" && continue 2
914
					done
915
					IFACE="`type_filter $IFACE`"
916
					test -z "$IFACE" && continue
917
					status -m $IFACE &>/dev/null
918
					RET=$?
919
					if [ $RET = 0 ] ; then
920
						SUCCESS_IFACES="$SUCCESS_IFACES $IFACE"
921
						if [ "$NEWLINE" = yes ] ; then
922
							echo
923
							NEWLINE=no
924
						fi
925
						status $IFACE
926
						continue
927
					fi
928
					VIRTUAL_IFACES="$VIRTUAL_IFACES $IFACE"
929
				done
930
	
931
				IFS=. read a b < /proc/uptime
932
				TTWAIT2=$((a - (TTWAIT + `cat $NETWORK_RUNFILE`)))
933
				test $TTWAIT2 -gt $((WAIT_FOR_INTERFACES)) \
934
					-o -z "$VIRTUAL_IFACES" && break
935
936
				debug "Time to wait: $((WAIT_FOR_INTERFACES - TTWAIT2))"
937
				if [ "$NEWLINE" != yes ] ; then
938
					echo "Waiting for virtual interfaces: $VIRTUAL_IFACES"
939
				fi
940
				echo -n "$((WAIT_FOR_INTERFACES - TTWAIT2)) "
941
				NEWLINE=yes
942
				sleep 1
943
			done
944
945
			if [ "$NEWLINE" = yes ] ; then
946
				echo
947
			fi
948
949
			for IFACE in $VIRTUAL_IFACES; do
950
				if [ -d /sys/class/net/$IFACE ] ; then
951
					status -m $IFACE && continue
952
					printf "    %-9s interface is not ready until now\n" $IFACE
953
				fi
954
				rc_failed
955
				rc_status -v1
956
				: $((FAILED++))
957
			done
958
		fi
906
959
907
		rc_reset
960
		rc_reset
908
		if [ -z "$INTERFACE" ] ; then
961
		if [ -z "$INTERFACE" ] ; then
Lines 940-947 case "$ACTION" in Link Here
940
			# printf "    %-9s " $IFACE
993
			# printf "    %-9s " $IFACE
941
			$FAKE ifdown $CONFIG $IFACE -o rc $MODE
994
			$FAKE ifdown $CONFIG $IFACE -o rc $MODE
942
			RET=$?
995
			RET=$?
943
			debug && printf "    %-9s returned %s\n" $IFACE $RET || \
996
			debug && printf "    %-9s returned %s\n" $IFACE $RET
944
			         printf "    %-9s\n" $IFACE
945
			rc_failed $RET
997
			rc_failed $RET
946
			case "$RET" in
998
			case "$RET" in
947
				$R_NODEV|$R_NOTCONFIGURED|$R_INACTIVE)
999
				$R_NODEV|$R_NOTCONFIGURED|$R_INACTIVE)
Lines 988-995 case "$ACTION" in Link Here
988
			fi
1040
			fi
989
			$FAKE ifdown $CONFIG $IFACE -o rc $MODE
1041
			$FAKE ifdown $CONFIG $IFACE -o rc $MODE
990
			RET=$?
1042
			RET=$?
991
			debug && printf "    %-9s returned %s\n" $IFACE $RET || \
1043
			debug && printf "    %-9s returned %s\n" $IFACE $RET
992
			         printf "    %-9s\n" $IFACE
993
			rc_failed $RET
1044
			rc_failed $RET
994
			case "$RET" in
1045
			case "$RET" in
995
				$R_NODEV|$R_NOTCONFIGURED|$R_INACTIVE)
1046
				$R_NODEV|$R_NOTCONFIGURED|$R_INACTIVE)
996
- 

Return to bug 697929