From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 25/29] dhcpcd.exe: Add a safety net to make sure we always have a route Date: Thu, 01 Dec 2022 17:23:14 +0000 Message-ID: <20221201172318.3166615-25-michael.tremer@ipfire.org> In-Reply-To: <20221201172318.3166615-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1733131394640816035==" List-Id: --===============1733131394640816035== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Michael Tremer --- src/initscripts/networking/dhcpcd.exe | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/initscripts/networking/dhcpcd.exe b/src/initscripts/networki= ng/dhcpcd.exe index 4ab9fbc43..220f95c83 100644 --- a/src/initscripts/networking/dhcpcd.exe +++ b/src/initscripts/networking/dhcpcd.exe @@ -60,6 +60,18 @@ dhcpcd_up() mv /tmp/hosts /etc/hosts fi =20 + # Try to set the default route if there is none + # This can happen when we are using the 3RD party configuration + # This should not be necessary, since dhcpcd says it will configure + # a default route, but that does not seem to happen: + # https://github.com/NetworkConfiguration/dhcpcd/issues/129 + if ! ip route 2>/dev/null | grep ^default && [ -s "/var/ipfire/red/remote-i= paddress" ]; then + gateway=3D$(