From 991bb0cd7e71b3ab04b505a06278f04c2cec9787 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 6 Nov 2015 17:39:18 +0100 Subject: [PATCH] Don't use 'which' in the 'prepare-dirs' script refs #10417 --- etc/initsystem/prepare-dirs | 2 +- etc/initsystem/safe-reload | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/initsystem/prepare-dirs b/etc/initsystem/prepare-dirs index 8472466e9..64757c2a6 100644 --- a/etc/initsystem/prepare-dirs +++ b/etc/initsystem/prepare-dirs @@ -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 diff --git a/etc/initsystem/safe-reload b/etc/initsystem/safe-reload index 70a1a4aba..c22069cce 100644 --- a/etc/initsystem/safe-reload +++ b/etc/initsystem/safe-reload @@ -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