]> granicus.if.org Git - icinga2/commitdiff
Don't use 'which' in the 'prepare-dirs' script
authorGunnar Beutner <gunnar@beutner.name>
Fri, 6 Nov 2015 16:39:18 +0000 (17:39 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 6 Nov 2015 16:43:08 +0000 (17:43 +0100)
refs #10417

etc/initsystem/prepare-dirs
etc/initsystem/safe-reload

index 8472466e9005daee78272a7fe5f90b03bf3c31f7..64757c2a6403e6876571cf4e7e16e349e6c19181 100644 (file)
@@ -47,7 +47,7 @@ fi
 
 mkdir -p $ICINGA2_RUN_DIR/icinga2/cmd
 chown $ICINGA2_USER:$ICINGA2_COMMAND_GROUP $ICINGA2_RUN_DIR/icinga2/cmd
-if which restorecon >/dev/null 2&>1; then
+if type restorecon >/dev/null 2&>1; then
        restorecon -R $ICINGA2_RUN_DIR/icinga2/
 fi
 chmod 2750 $ICINGA2_RUN_DIR/icinga2/cmd
index 70a1a4aba2ac2973f3e03a91c26c6561544b9aae..c22069ccef440388b7c936610d2b48ed9ee11642 100644 (file)
@@ -12,7 +12,7 @@ printf "Validating config files: "
 
 OUTPUTFILE=`mktemp`
 
-if env chcon >/dev/null 2&>1; then
+if type chcon >/dev/null 2&>1; then
        chcon -t icinga2_tmp_t $OUTPUTFILE
 fi