From 82e1bf0376fe792ed063f21031bf33d4706a7d02 Mon Sep 17 00:00:00 2001 From: Wilfredo Sanchez Date: Tue, 7 Dec 1999 00:09:01 +0000 Subject: [PATCH] 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 --- support/apxs.in | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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"; + } + } } } -- 2.50.1