File 0564-40network-Always-set-the-gw-variable.patch of Package dracut.16003
From 25c8b7f654a906d9829e273578b02d5e6a4c2b0c Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Thu, 15 Mar 2018 19:01:58 +0100
Subject: [PATCH] 40network: Always set the gw variable
$gw was not set in case of dhcp. This resulted in some codepathes,
including vital checks, not being executed with wicked.
Reference: bsc#1085614
---
modules.d/40network/ifup.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
index a51b6a30..2d93cebd 100755
--- a/modules.d/40network/ifup.sh
+++ b/modules.d/40network/ifup.sh
@@ -123,6 +123,7 @@ dhcp_apply() {
# Assign provided routers
local g
if [ -n "${GATEWAYS}" ]; then
+ gw="${GATEWAYS%% *}"
for g in ${GATEWAYS}; do
ip $1 route add default via "$g" dev "$INTERFACE" && break
done
--
2.13.6