From 45521b377a88240d883e78800546c3cba3666b99 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 26 Jul 2018 17:46:51 +0100 Subject: [PATCH] Use ip route rather than old net-tools route in chronometer.sh The only use of net-tools is the use of route in chronometer.sh so instead use the same method as used in piholeDebug.sh to get the default gateway so there's no need to depend on net-tools anylonger. Signed-off-by: Peter Robinson --- advanced/Scripts/chronometer.sh | 2 +- automated install/basic-install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/chronometer.sh b/advanced/Scripts/chronometer.sh index 046a98c4..ed2c8ab9 100755 --- a/advanced/Scripts/chronometer.sh +++ b/advanced/Scripts/chronometer.sh @@ -243,7 +243,7 @@ get_sys_stats() { disk_total="${disk_raw[1]}" disk_perc="${disk_raw[2]}" - net_gateway=$(route -n | awk '$4 == "UG" {print $2;exit}') + net_gateway=$(ip route | grep default | cut -d ' ' -f 3) # Get DHCP stats, if feature is enabled if [[ "$DHCP_ACTIVE" == "true" ]]; then diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 3d1a779d..90a05a6c 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -323,7 +323,7 @@ elif command -v rpm &> /dev/null; then UPDATE_PKG_CACHE=":" PKG_INSTALL=(${PKG_MANAGER} install -y) PKG_COUNT="${PKG_MANAGER} check-update | egrep '(.i686|.x86|.noarch|.arm|.src)' | wc -l" - INSTALLER_DEPS=(dialog git iproute net-tools newt procps-ng which) + INSTALLER_DEPS=(dialog git iproute newt procps-ng which) PIHOLE_DEPS=(bc bind-utils cronie curl findutils nmap-ncat sudo unzip wget libidn2 psmisc) PIHOLE_WEB_DEPS=(lighttpd lighttpd-fastcgi php-common php-cli php-pdo) LIGHTTPD_USER="lighttpd"