Changes with Apache 2.1.0-dev
+ *) 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 [Joe Orton]
[Remove entries to the current 2.0 section below, when backported]
##
# determine installation commands
- # and corresponding LoadModule/AddModule directives
+ # and corresponding LoadModule directive
my @lmd = ();
- my @amd = ();
my @cmds = ();
my $f;
foreach $f (@args) {
$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
$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);