mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 06:48:07 +00:00
commit
16fb6665ec
@ -585,6 +585,27 @@ processor_check() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disk_usage() {
|
||||||
|
local file_system
|
||||||
|
local hide
|
||||||
|
|
||||||
|
echo_current_diagnostic "Disk usage"
|
||||||
|
mapfile -t file_system < <(df -h)
|
||||||
|
|
||||||
|
# Some lines of df might contain sensitive information like usernames and passwords.
|
||||||
|
# E.g. curlftpfs filesystems (https://www.looklinux.com/mount-ftp-share-on-linux-using-curlftps/)
|
||||||
|
# We are not interested in those lines so we collect keyword, to remove them from the output
|
||||||
|
# Additinal keywords can be added, separated by "|"
|
||||||
|
hide="curlftpfs"
|
||||||
|
|
||||||
|
# only show those lines not containg a sensitive phrase
|
||||||
|
for line in "${file_system[@]}"; do
|
||||||
|
if [[ ! $line =~ $hide ]]; then
|
||||||
|
log_write " ${line}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
parse_setup_vars() {
|
parse_setup_vars() {
|
||||||
echo_current_diagnostic "Setup variables"
|
echo_current_diagnostic "Setup variables"
|
||||||
# If the file exists,
|
# If the file exists,
|
||||||
@ -1421,6 +1442,7 @@ diagnose_operating_system
|
|||||||
check_selinux
|
check_selinux
|
||||||
check_firewalld
|
check_firewalld
|
||||||
processor_check
|
processor_check
|
||||||
|
disk_usage
|
||||||
check_networking
|
check_networking
|
||||||
check_name_resolution
|
check_name_resolution
|
||||||
check_dhcp_servers
|
check_dhcp_servers
|
||||||
|
Loading…
Reference in New Issue
Block a user