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