diff options
author | Bill Stoddard <stoddard@apache.org> | 2002-12-09 15:00:59 +0000 |
---|---|---|
committer | Bill Stoddard <stoddard@apache.org> | 2002-12-09 15:00:59 +0000 |
commit | 7686499cedcc3ccb7e120f64c084fa877dae62dd (patch) | |
tree | ec1b94d6577c03dbab55d02860e1b13d0b25d658 /support/apxs.in | |
parent | e78ff13c7cd182ea8043ef8cdcd8542c627994f5 (diff) | |
download | httpd-7686499cedcc3ccb7e120f64c084fa877dae62dd.tar.gz |
If an httpd.conf has commented out AddModule directives,
apxs -i -a will add an un-commented AddModule directive for
the new module, which breaks the config.
PR: 11212
Obtained from:
Submitted by: Joe Orton
Reviewed by: Bill Stoddard, Thom May
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97820 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/apxs.in')
-rw-r--r-- | support/apxs.in | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/support/apxs.in b/support/apxs.in index ed3de518ce..4be6d89328 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -490,9 +490,8 @@ if ($opt_i or $opt_e) { ## # determine installation commands - # and corresponding LoadModule/AddModule directives + # and corresponding LoadModule directive my @lmd = (); - my @amd = (); my @cmds = (); my $f; foreach $f (@args) { @@ -546,7 +545,6 @@ if ($opt_i or $opt_e) { $dir =~ s|(.)$|$1/|; $t =~ s|\.la$|.so|; push(@lmd, sprintf("LoadModule %-18s %s", "${name}_module", "$dir$t")); - push(@amd, sprintf("AddModule %s", $filename)); } # execute the commands @@ -582,15 +580,7 @@ if ($opt_i or $opt_e) { $lmd =~ m|LoadModule\s+(.+?)_module.*|; notice("[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]"); } - my $amd; - foreach $amd (@amd) { - if ($content !~ m|\n#?\s*$amd|) { - $content =~ s|^(.*\n#?\s*AddModule\s+[^\n]+\n)|$1$c$amd\n|sg; - } else { - $content =~ s|^(.*\n)#?\s*$amd[^\n]*\n|$1$c$amd\n|sg; - } - } - if (@lmd or @amd) { + if (@lmd) { if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) { print FP $content; close(FP); |