selinux: fix output consistency
install mode was silent when selinux was not enabled, whilst remove mode
always output a "Begin unmounting..." message. this makes both modes silent
when selinux is not enabled.
this also happens to fix an unintended side effect of
d79c96232b
whereby a warning subsequently
was always emitted in remove mode when selinux was not in use, which was
not ideal.
Gbp-Dch: Short
This commit is contained in:
parent
931f42fa39
commit
80d9c93de9
|
@ -24,10 +24,15 @@ Init_config_data "${@}"
|
||||||
# Requiring stage file
|
# Requiring stage file
|
||||||
Require_stagefiles config bootstrap
|
Require_stagefiles config bootstrap
|
||||||
|
|
||||||
|
# Skip if selinux is not enabled
|
||||||
|
if [ ! -e /sys/fs/selinux/enforce ] || [ "$(cat /sys/fs/selinux/enforce)" != "1" ]
|
||||||
|
then
|
||||||
|
Echo_debug "Skipping due to selinux being disabled..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
install)
|
install)
|
||||||
if [ -e /sys/fs/selinux/enforce ] && [ "$(cat /sys/fs/selinux/enforce)" = "1" ]
|
|
||||||
then
|
|
||||||
Echo_message "Begin mounting /sys/fs/selinux..."
|
Echo_message "Begin mounting /sys/fs/selinux..."
|
||||||
|
|
||||||
# Checking stage file
|
# Checking stage file
|
||||||
|
@ -44,7 +49,6 @@ case "${1}" in
|
||||||
|
|
||||||
# Creating stage file
|
# Creating stage file
|
||||||
Create_stagefile
|
Create_stagefile
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
remove)
|
remove)
|
||||||
|
|
Loading…
Reference in New Issue