]> granicus.if.org Git - apache/commitdiff
If we can't open httpd.conf, print a warning, but don't die.
authorWilfredo Sanchez <wsanchez@apache.org>
Tue, 7 Dec 1999 00:09:01 +0000 (00:09 +0000)
committerWilfredo Sanchez <wsanchez@apache.org>
Tue, 7 Dec 1999 00:09:01 +0000 (00:09 +0000)
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

index 5901a4e17b006e34a3ff99f71fd5c79959e70c0d..dbb20bf91602db9b005074777fd3fde84499916b 100644 (file)
@@ -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";
+            }
+       }
     }
 }