From: Michael Tremer Date: Thu, 8 Sep 2022 10:26:25 +0000 (+0200) Subject: dhcpcd.exe: Store the default gateway when in QMI mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1abd13ddaac0506265e531a9a52241094b1c7237;p=people%2Fms%2Fipfire-2.x.git dhcpcd.exe: Store the default gateway when in QMI mode Signed-off-by: Michael Tremer --- diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networking/dhcpcd.exe index b557bcb121..fe64132c89 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -146,7 +146,13 @@ setup_qmi() { ip addr add "${address}/${netmask}" dev "${interface}" # Configure the default route - ip route add default via "${gateway}" mtu "${mtu}" + if [ -n "${gateway}" ]; then + # Store the default gateway + echo -n "${gateway}" > /var/ipfire/red/remote-ipaddress + + # Configure the default route + ip route add default via "${gateway}" mtu "${mtu}" + fi return 0 }