dracut/backport-fix-40network-consistent-use-of-gw-for-gateway.patch
hongjinghao 9d9fb131b3 backport patchs from upstream
(cherry picked from commit 74c55dc789a3aacb444c42ab40cd308bd213f5e3)
2024-02-22 16:48:54 +08:00

32 lines
1.3 KiB
Diff

From 3f2c76bb1456941a28d3333569d2bf18f8624617 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Wed, 19 Jan 2022 10:37:19 +0100
Subject: [PATCH] fix(40network): consistent use of "$gw" for gateway
Replace wrong use of $gateway with $gw.
Signed-off-by: Martin Wilck <mwilck@suse.com>
Reference:https://github.com/dracutdevs/dracut/commit/3f2c76bb1456941a28d3333569d2bf18f8624617
Conflict:NA
---
modules.d/40network/net-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
index 54bb6775..a294a390 100755
--- a/modules.d/40network/net-lib.sh
+++ b/modules.d/40network/net-lib.sh
@@ -295,7 +295,7 @@ ibft_to_cmdline() {
# skip not assigned ip adresses
[ "$ip" = "0.0.0.0" ] && continue
[ -e "${iface}"/gateway ] && read -r gw < "${iface}"/gateway
- [ "$gateway" = "0.0.0.0" ] && unset gateway
+ [ "$gw" = "0.0.0.0" ] && unset gw
[ -e "${iface}"/subnet-mask ] && read -r mask < "${iface}"/subnet-mask
[ -e "${iface}"/prefix-len ] && read -r prefix < "${iface}"/prefix-len
[ -e "${iface}"/primary-dns ] && read -r dns1 < "${iface}"/primary-dns
--
2.23.0