mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Merge pull request #3002 from pi-hole/tweak/output-format
add a double space to the beginning of some outputs
This commit is contained in:
commit
1fb70c977c
1 changed files with 8 additions and 8 deletions
|
@ -1968,32 +1968,32 @@ 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
|
||||||
echo -e "${INFO} ${COL_GREEN}SELinux not detected${COL_NC}";
|
echo -e " ${INFO} ${COL_GREEN}SELinux not detected${COL_NC}";
|
||||||
fi
|
fi
|
||||||
# Exit the installer if any SELinux checks toggled the flag
|
# Exit the installer if any SELinux checks toggled the flag
|
||||||
if [[ "${SELINUX_ENFORCING}" -eq 1 ]] && [[ -z "${PIHOLE_SELINUX}" ]]; then
|
if [[ "${SELINUX_ENFORCING}" -eq 1 ]] && [[ -z "${PIHOLE_SELINUX}" ]]; then
|
||||||
printf "Pi-hole does not provide an SELinux policy as the required changes modify the security of your system.\\n"
|
printf " Pi-hole does not provide an SELinux policy as the required changes modify the security of your system.\\n"
|
||||||
printf "Please refer to https://wiki.centos.org/HowTos/SELinux if SELinux is required for your deployment.\\n"
|
printf " Please refer to https://wiki.centos.org/HowTos/SELinux if SELinux is required for your deployment.\\n"
|
||||||
printf "\\n%bSELinux Enforcing detected, exiting installer%b\\n" "${COL_LIGHT_RED}" "${COL_NC}";
|
printf "\\n %bSELinux Enforcing detected, exiting installer%b\\n" "${COL_LIGHT_RED}" "${COL_NC}";
|
||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue