1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 04:30:55 +00:00

Merge pull request #3741 from pi-hole/new/debug_scan_dhcp

Discover active DHCP servers during debugger run
This commit is contained in:
Adam Warner 2020-10-09 14:00:57 +01:00 committed by GitHub
commit fe463f15b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1117,6 +1117,21 @@ show_db_entries() {
IFS="$OLD_IFS"
}
check_dhcp_servers() {
echo_current_diagnostic "Discovering active DHCP servers (takes 10 seconds)"
OLD_IFS="$IFS"
IFS=$'\n'
local entries=()
mapfile -t entries < <(pihole-FTL dhcp-discover)
for line in "${entries[@]}"; do
log_write " ${line}"
done
IFS="$OLD_IFS"
}
show_groups() {
show_db_entries "Groups" "SELECT id,CASE enabled WHEN '0' THEN ' 0' WHEN '1' THEN ' 1' ELSE enabled END enabled,name,datetime(date_added,'unixepoch','localtime') date_added,datetime(date_modified,'unixepoch','localtime') date_modified,description FROM \"group\"" "4 7 50 19 19 50"
}
@ -1308,6 +1323,7 @@ check_selinux
processor_check
check_networking
check_name_resolution
check_dhcp_servers
process_status
parse_setup_vars
check_x_headers