wsanchez 99/12/06 16:09:04
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.3 +10 -7 apache-2.0/src/support/apxs.pl Index: apxs.pl =================================================================== RCS file: /home/cvs/apache-2.0/src/support/apxs.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- apxs.pl 1999/12/07 00:06:41 1.2 +++ apxs.pl 1999/12/07 00:09:01 1.3 @@ -511,13 +511,16 @@ } } 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"; + } + } } }