dhcpcd.exe: Store the default gateway when in QMI mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2022-12-01 17:23:05 +00:00
committed by Peter Müller
parent 36914cce70
commit 261727435d

View File

@@ -145,8 +145,14 @@ setup_qmi() {
# Configure the IP address
ip addr add "${address}/${netmask}" dev "${interface}"
# Configure the default route
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
}