Set optional interface variables when there are no providers

This commit is contained in:
Tom Eastep 2009-06-15 12:07:18 -07:00
parent c96db9a01c
commit 8eb6ab7cc9

View File

@ -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' );
}
}
} }
} }