mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-07 10:16:42 +02: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;
|
my $physical = get_physical $interface;
|
||||||
|
|
||||||
if ( $physical =~ /\+$/ ) {
|
if ( $physical =~ /\+$/ ) {
|
||||||
my $base = uc chain_base $physical;
|
|
||||||
|
|
||||||
$physical =~ s/\+$/*/;
|
$physical =~ s/\+$/*/;
|
||||||
|
|
||||||
emit( 'for interface in $(find_all_interfaces); do',
|
emit( "waittime=$wait",
|
||||||
|
'',
|
||||||
|
'for interface in $(find_all_interfaces); do',
|
||||||
' case $interface in',
|
' case $interface in',
|
||||||
" $physical)",
|
" $physical)",
|
||||||
" waittime=$wait",
|
|
||||||
' while [ $waittime -gt 0 ]; do',
|
' while [ $waittime -gt 0 ]; do',
|
||||||
' interface_is_usable $interface && break',
|
' interface_is_usable $interface && break',
|
||||||
|
' sleep 1',
|
||||||
' waittime=$(($waittime - 1))',
|
' waittime=$(($waittime - 1))',
|
||||||
' done',
|
' done',
|
||||||
' ;;',
|
' ;;',
|
||||||
@ -1644,8 +1644,8 @@ sub verify_required_interfaces( $ ) {
|
|||||||
emit qq( waittime=$wait);
|
emit qq( waittime=$wait);
|
||||||
emit '';
|
emit '';
|
||||||
emit q( while [ $waittime -gt 0 ]; do);
|
emit q( while [ $waittime -gt 0 ]; do);
|
||||||
emit qq( interface_is_usable $physical && break);
|
|
||||||
emit q( sleep 1);
|
emit q( sleep 1);
|
||||||
|
emit qq( interface_is_usable $physical && break);
|
||||||
emit ' waittime=$(($waittime - 1))';
|
emit ' waittime=$(($waittime - 1))';
|
||||||
emit q( done);
|
emit q( done);
|
||||||
emit q(fi);
|
emit q(fi);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user