mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 20:30:43 +01:00
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:
parent
e4d66fb5fc
commit
000cc6978a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user