mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 14:58:08 +00:00
Print all SELINUX output in lowercase
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
e0baf4c7ec
commit
b25805348f
@ -2050,22 +2050,22 @@ checkSelinux() {
|
|||||||
DEFAULT_SELINUX=$(awk -F= '/^SELINUX=/ {print $2}' /etc/selinux/config)
|
DEFAULT_SELINUX=$(awk -F= '/^SELINUX=/ {print $2}' /etc/selinux/config)
|
||||||
case "${DEFAULT_SELINUX,,}" in
|
case "${DEFAULT_SELINUX,,}" in
|
||||||
enforcing)
|
enforcing)
|
||||||
printf " %b %bDefault SELinux: %s%b\\n" "${CROSS}" "${COL_RED}" "${DEFAULT_SELINUX}" "${COL_NC}"
|
printf " %b %bDefault SELinux: %s%b\\n" "${CROSS}" "${COL_RED}" "${DEFAULT_SELINUX,,}" "${COL_NC}"
|
||||||
SELINUX_ENFORCING=1
|
SELINUX_ENFORCING=1
|
||||||
;;
|
;;
|
||||||
*) # 'permissive' and 'disabled'
|
*) # 'permissive' and 'disabled'
|
||||||
printf " %b %bDefault SELinux: %s%b\\n" "${TICK}" "${COL_GREEN}" "${DEFAULT_SELINUX}" "${COL_NC}"
|
printf " %b %bDefault SELinux: %s%b\\n" "${TICK}" "${COL_GREEN}" "${DEFAULT_SELINUX,,}" "${COL_NC}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Check the current state of SELinux
|
# Check the current state of SELinux
|
||||||
CURRENT_SELINUX=$(getenforce)
|
CURRENT_SELINUX=$(getenforce)
|
||||||
case "${CURRENT_SELINUX,,}" in
|
case "${CURRENT_SELINUX,,}" in
|
||||||
enforcing)
|
enforcing)
|
||||||
printf " %b %bCurrent SELinux: %s%b\\n" "${CROSS}" "${COL_RED}" "${CURRENT_SELINUX}" "${COL_NC}"
|
printf " %b %bCurrent SELinux: %s%b\\n" "${CROSS}" "${COL_RED}" "${CURRENT_SELINUX,,}" "${COL_NC}"
|
||||||
SELINUX_ENFORCING=1
|
SELINUX_ENFORCING=1
|
||||||
;;
|
;;
|
||||||
*) # 'permissive' and 'disabled'
|
*) # 'permissive' and 'disabled'
|
||||||
printf " %b %bCurrent SELinux: %s%b\\n" "${TICK}" "${COL_GREEN}" "${CURRENT_SELINUX}" "${COL_NC}"
|
printf " %b %bCurrent SELinux: %s%b\\n" "${TICK}" "${COL_GREEN}" "${CURRENT_SELINUX,,}" "${COL_NC}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user