diff options
Diffstat (limited to 'support/apxs.in')
-rw-r--r-- | support/apxs.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/support/apxs.in b/support/apxs.in index 1dcc82ed..1900a787 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -83,7 +83,6 @@ sub Getopts { my ($argumentative, @ARGV) = @_; my $errs = 0; local $_; - local $[ = 0; my @args = split / */, $argumentative; while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { @@ -93,7 +92,7 @@ sub Getopts { last; } my $pos = index($argumentative,$first); - if ($pos >= $[) { + if ($pos >= 0) { if ($pos < $#args && $args[$pos+1] eq ':') { shift @ARGV; if ($rest eq '') { @@ -547,7 +546,10 @@ if ($opt_i or $opt_e) { $c = '#' if ($opt_A); foreach $lmd (@lmd) { my $what = $opt_A ? "preparing" : "activating"; - if ($content !~ m|\n#?\s*$lmd|) { + my $lmd_re = $lmd; + $lmd_re =~ s/\s+/\\s+/g; + + if ($content !~ m|\n#?\s*$lmd_re|) { # check for open <containers>, so that the new LoadModule # directive always appears *outside* of an <container>. @@ -610,7 +612,7 @@ if ($opt_i or $opt_e) { } } else { # replace already existing LoadModule line - $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|s; + $content =~ s|^(.*\n)#?\s*$lmd_re[^\n]*\n|$1$c$lmd\n|s; } $lmd =~ m|LoadModule\s+(.+?)_module.*|; notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]"); |