wsanchez 99/12/06 16:03:26
Modified: src/support apxs.pl
Log:
If we can't open httpd.conf, print a warning, but don't die.
Otherwise, you can't install a module into a package root.
Revision Changes Path
1.30 +11 -8 apache-1.3/src/support/apxs.pl
Index: apxs.pl
===================================================================
RCS file: /home/cvs/apache-1.3/src/support/apxs.pl,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- apxs.pl 1999/12/06 23:55:37 1.29
+++ apxs.pl 1999/12/07 00:03:24 1.30
@@ -510,15 +510,18 @@
} else {
$content =~ s|^(.*\n)#?\s*$amd[^\n]*\n|$1$c$amd\n|sg;
}
- }
+ }
if (@lmd or @amd) {
- open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new") || die;
- print FP $content;
- close(FP);
- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf
$CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new
$CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
- }
+ if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
+ print FP $content;
+ close(FP);
+ system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf
$CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
+ "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new
$CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
+ "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
+ } else {
+ print STDERR "unable to open configuration file\n";
+ }
+ }
}
}