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)."