From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 18/29] dhcpcd.exe: Do not overwrite the default gateway when empty Date: Thu, 01 Dec 2022 17:23:07 +0000 Message-ID: <20221201172318.3166615-18-michael.tremer@ipfire.org> In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2963217096612491891==" List-Id: --===============2963217096612491891== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- src/initscripts/networking/dhcpcd.exe | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networki= ng/dhcpcd.exe index acd083b6f..b85a2c598 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -63,7 +63,11 @@ dhcpcd_up() =20 if [ $update ]; then [ -e "/var/ipfire/red/active" ] || touch /var/ipfire/red/active - echo -n "$new_routers" > /var/ipfire/red/remote-ipaddress + + if [ -n "${new_routers}" ]; then + echo -n "${new_routers}" > /var/ipfire/red/remote-ipaddress + fi + logger -p local0.info -t dhcpcd.exe[$$] "$interface has been (re)configure= d with IP=3D$new_ip_address" run_subdir ${rc_base}/init.d/networking/red.up/ touch /var/ipfire/red/active --=20 2.30.2 --===============2963217096612491891==--