From: Wilfredo Sanchez Date: Tue, 7 Dec 1999 00:09:01 +0000 (+0000) Subject: If we can't open httpd.conf, print a warning, but don't die. X-Git-Tag: 1.3.10~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82e1bf0376fe792ed063f21031bf33d4706a7d02;p=apache 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84240 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/apxs.in b/support/apxs.in index 5901a4e17b..dbb20bf916 100644 --- a/support/apxs.in +++ b/support/apxs.in @@ -511,13 +511,16 @@ if ($opt_i or $opt_e) { } } 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"; + } + } } }