From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 16/29] dhcpcd.exe: Store the default gateway when in QMI mode Date: Thu, 01 Dec 2022 17:23:05 +0000 Message-ID: <20221201172318.3166615-16-michael.tremer@ipfire.org> In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8709770156679654528==" List-Id: --===============8709770156679654528== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- src/initscripts/networking/dhcpcd.exe | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networki= ng/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}" =20 # 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 =20 return 0 } --=20 2.30.2 --===============8709770156679654528==--