mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Only execute chcon if selinux is enabled and use full context
fixes #10773
This commit is contained in:
parent
ba1cc1c5fa
commit
c7c3cceba8
@ -12,8 +12,10 @@ printf "Validating config files: "
|
|||||||
|
|
||||||
OUTPUTFILE=`mktemp`
|
OUTPUTFILE=`mktemp`
|
||||||
|
|
||||||
if type chcon >/dev/null 2>&1; then
|
if type selinuxenabled >/dev/null 2>&1; then
|
||||||
chcon -t icinga2_tmp_t $OUTPUTFILE
|
if selinuxenabled; then
|
||||||
|
chcon -t icinga2_tmp_t $OUTPUTFILE
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $DAEMON daemon --validate --color > $OUTPUTFILE; then
|
if ! $DAEMON daemon --validate --color > $OUTPUTFILE; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user