From 66f937ab3e4e2edba74918bd8107162c36078de0 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 24 Jun 2020 22:12:58 +0200 Subject: [PATCH] v6.31 + DietPi-Set_software | NTP mirror: Fix gateway detection --- dietpi/func/dietpi-set_software | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dietpi/func/dietpi-set_software b/dietpi/func/dietpi-set_software index 3163f9e836..eced8a5d11 100644 --- a/dietpi/func/dietpi-set_software +++ b/dietpi/func/dietpi-set_software @@ -274,7 +274,7 @@ _EOF_ if [[ ${ntp_mirror,,} == 'gateway' ]]; then # NB: Convert output to single line via ORS, remove trailing space afterwards - local gateway=$(ip r s 0.0.0.0/0 | mawk '{print $3}' ORS=' ') gateway=${gateway% } + local gateway=$(ip r l 0/0 | mawk '{print $3}' ORS=' '); gateway=${gateway% } if [[ $gateway ]]; then G_DIETPI-NOTIFY 0 "Gateway(s) detected: $gateway, adding as NTP server(s)."