Prepare for multiple options in actions files

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2012-12-03 08:17:55 -08:00
parent ad4709cb6d
commit fc3606a489

View File

@ -1478,13 +1478,19 @@ sub process_actions() {
fatal_error "Invalid Action Name ($action)" unless $action =~ /^[a-zA-Z][\w-]*$/; fatal_error "Invalid Action Name ($action)" unless $action =~ /^[a-zA-Z][\w-]*$/;
if ( $options eq 'inline' ) { if ( $options ne '-' ) {
for ( split_list( $options, 'option' ) ) {
if ( $_ eq 'inline' ) {
$type = INLINE; $type = INLINE;
} elsif ( $options eq 'noinline' ) { } elsif ( $_ eq 'noinline' ) {
$noinline = 1; $noinline = 1;
} else { } else {
fatal_error "Invalid option($options)" unless $options eq '-'; fatal_error "Invalid option ($_)";
} }
}
}
fatal_error "Conflicting OPTIONS ($options)" if $noinline && $type == INLINE;
if ( my $actiontype = $targets{$action} ) { if ( my $actiontype = $targets{$action} ) {
if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) { if ( ( $actiontype & ACTION ) && ( $type == INLINE ) ) {