Make replacement of '+' by '*' global in case statements.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-11-04 13:48:13 -07:00
parent aed595f1d8
commit 689e9b0fe1
2 changed files with 4 additions and 4 deletions

View File

@ -174,7 +174,7 @@ sub copy_and_edit_table( $$$$ ) {
#
# Shell and iptables use a different wildcard character
#
$copy =~ s/\+/*/;
$copy =~ s/\+/*/g;
emit '';

View File

@ -1623,7 +1623,7 @@ sub compile_updown() {
if ( @$ignore ) {
my $interfaces = join '|', map $interfaces{$_}->{physical}, @$ignore;
$interfaces =~ s/\+/*/;
$interfaces =~ s/\+/*/g;
emit( "$interfaces)",
' progress_message3 "$COMMAND on interface $1 ignored"',
@ -1635,7 +1635,7 @@ sub compile_updown() {
if ( @$required ) {
my $interfaces = join '|', map $interfaces{$_}->{physical}, @$required;
my $wildcard = ( $interfaces =~ s/\+/*/ );
my $wildcard = ( $interfaces =~ s/\+/*/g );
emit( "$interfaces)",
' if [ "$COMMAND" = up ]; then' );
@ -1677,7 +1677,7 @@ sub compile_updown() {
my @interfaces = map $interfaces{$_}->{physical}, @$optional;
my $interfaces = join '|', @interfaces;
if ( $interfaces =~ s/\+/*/ || @interfaces > 1 ) {
if ( $interfaces =~ s/\+/*/g || @interfaces > 1 ) {
emit( "$interfaces)",
' if [ "$COMMAND" = up ]; then',
' echo 0 > ${VARDIR}/${1}.state',