Add missing 'sleep' when waiting for wildcard interface to come up

- Also reverse the order of test and sleep when waiting for a regular
  interface to come up.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-07-03 08:06:30 -07:00
parent e4d66fb5fc
commit 000cc6978a

View File

@ -1622,16 +1622,16 @@ sub verify_required_interfaces( $ ) {
my $physical = get_physical $interface;
if ( $physical =~ /\+$/ ) {
my $base = uc chain_base $physical;
$physical =~ s/\+$/*/;
emit( 'for interface in $(find_all_interfaces); do',
emit( "waittime=$wait",
'',
'for interface in $(find_all_interfaces); do',
' case $interface in',
" $physical)",
" waittime=$wait",
' while [ $waittime -gt 0 ]; do',
' interface_is_usable $interface && break',
' sleep 1',
' waittime=$(($waittime - 1))',
' done',
' ;;',
@ -1644,8 +1644,8 @@ sub verify_required_interfaces( $ ) {
emit qq( waittime=$wait);
emit '';
emit q( while [ $waittime -gt 0 ]; do);
emit qq( interface_is_usable $physical && break);
emit q( sleep 1);
emit qq( interface_is_usable $physical && break);
emit ' waittime=$(($waittime - 1))';
emit q( done);
emit q(fi);