mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Set optional interface variables when there are no providers
This commit is contained in:
parent
c96db9a01c
commit
8eb6ab7cc9
@ -794,6 +794,30 @@ sub setup_providers() {
|
|||||||
|
|
||||||
emit "fi\n";
|
emit "fi\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $interfaces = find_interfaces_by_option 'optional';
|
||||||
|
|
||||||
|
if ( $interfaces ) {
|
||||||
|
emit '';
|
||||||
|
|
||||||
|
my $first = 1;
|
||||||
|
|
||||||
|
for my $interface ( @$interfaces ) {
|
||||||
|
my $base = uc chain_base( $interface );
|
||||||
|
|
||||||
|
if ( $first ) {
|
||||||
|
$first = 0;
|
||||||
|
} else {
|
||||||
|
emit '';
|
||||||
|
}
|
||||||
|
|
||||||
|
emit ( "if interface_is_usable $interface; then" ,
|
||||||
|
" ${base}_IS_UP=Yes" ,
|
||||||
|
'else' ,
|
||||||
|
" ${base}_IS_UP=" ,
|
||||||
|
'fi' );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user