mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
simplify selinux debug variables
This commit is contained in:
parent
1e6cc63abe
commit
a17d1be7a4
1 changed files with 4 additions and 4 deletions
|
@ -428,8 +428,8 @@ check_selinux() {
|
||||||
# Check if a SELinux configuration file exists
|
# Check if a SELinux configuration file exists
|
||||||
if [[ -f /etc/selinux/config ]]; then
|
if [[ -f /etc/selinux/config ]]; then
|
||||||
# If a SELinux configuration file was found, check the default SELinux mode.
|
# If a SELinux configuration file was found, check the default SELinux mode.
|
||||||
DEFAULT_SELINUX=$(egrep -i '^SELINUX=' /etc/selinux/config | cut -d'=' -f2 | awk '{print tolower($0)}')
|
DEFAULT_SELINUX=$(awk -F= '/^SELINUX=/ {print $2}' /etc/selinux/config)
|
||||||
case $DEFAULT_SELINUX in
|
case "${DEFAULT_SELINUX,,}" in
|
||||||
enforcing)
|
enforcing)
|
||||||
log_write "${CROSS} ${COL_LIGHT_RED}Default SELinux: $DEFAULT_SELINUX${COL_NC}"
|
log_write "${CROSS} ${COL_LIGHT_RED}Default SELinux: $DEFAULT_SELINUX${COL_NC}"
|
||||||
;;
|
;;
|
||||||
|
@ -438,8 +438,8 @@ check_selinux() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
# Check the current state of SELinux
|
# Check the current state of SELinux
|
||||||
CURRENT_SELINUX=$(getenforce | awk '{print tolower($0)}')
|
CURRENT_SELINUX=$(getenforce)
|
||||||
case $CURRENT_SELINUX in
|
case "${CURRENT_SELINUX,,}" in
|
||||||
enforcing)
|
enforcing)
|
||||||
log_write "${CROSS} ${COL_LIGHT_RED}Current SELinux: $CURRENT_SELINUX${COL_NC}"
|
log_write "${CROSS} ${COL_LIGHT_RED}Current SELinux: $CURRENT_SELINUX${COL_NC}"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue