]> granicus.if.org Git - icinga2/commitdiff
Update sysconfig read 6381/head
authorJean Flach <jean-marcel.flach@icinga.com>
Mon, 18 Jun 2018 08:27:35 +0000 (10:27 +0200)
committerJean Flach <jean-marcel.flach@icinga.com>
Mon, 18 Jun 2018 08:27:35 +0000 (10:27 +0200)
etc/initsystem/prepare-dirs.cmake
etc/initsystem/safe-reload.cmake

index b7e3b64227cb0115f82798b74367f9634572110c..d9b644b7a7ae0d1635db6c0f7308793b8533c423 100644 (file)
@@ -3,9 +3,13 @@
 # This script prepares directories and files needed for running Icinga2
 #
 
-# With sysvinit we need to pass the environment this way. Or do we?
+# Load sysconf on systems where the initsystem does not pass the environment
 if [ "$1" != "" ]; then
-       source "$1"
+       if [ -r "$1" ]; then
+               source "$1"
+       else
+               echo "Unable to read sysconf from '$1'. Exiting." && exit 6
+       fi
 fi
 
 # Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"
index 967e37268eabc7aa3412e243f77805fb1fb12c54..44b261eaef24ca3e5f89f6ec7caa488b08ed6f90 100644 (file)
@@ -1,8 +1,12 @@
 #!/bin/sh
 
-# With sysvinit we need to pass the environment this way. Or do we?
+# Load sysconf on systems where the initsystem does not pass the environment
 if [ "$1" != "" ]; then
-       source "$1"
+       if [ -r "$1" ]; then
+               source "$1"
+       else
+               echo "Unable to read sysconf from '$1'. Exiting." && exit 6
+       fi
 fi
 
 # Set defaults, to overwrite see "@ICINGA2_SYSCONFIGFILE@"