Signed-off-by: Michael Tremer michael.tremer@ipfire.org --- src/initscripts/networking/dhcpcd.exe | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networking/dhcpcd.exe index b557bcb12..fe64132c8 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 }