dracut/0141-network-dhclient-script.sh-fix-RENEW.patch

38 lines
1.5 KiB
Diff
Raw Normal View History

From e847a78bb6fb65ca9ea7e7987f378639e6d395b8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 8 Sep 2015 11:44:13 +0200
Subject: [PATCH] network/dhclient-script.sh: fix RENEW
Remove check, if interface is already up. It is for RENEW.
new_prefix is apparently new_subnet_mask
(cherry picked from commit 52845b168d0909d72b4c2f0b6511ed18877a31e8)
---
modules.d/40network/dhclient-script.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
index f55611d..9aac2b1 100755
--- a/modules.d/40network/dhclient-script.sh
+++ b/modules.d/40network/dhclient-script.sh
@@ -8,9 +8,6 @@ type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
# We already need a set netif here
netif=$interface
-# Huh? Interface configured?
-[ -f "/tmp/net.$netif.up" ] && exit 0
-
setup_interface() {
ip=$new_ip_address
mtu=$new_interface_mtu
@@ -151,7 +148,7 @@ case $reason in
[ -n "$new_max_life" ] && lease_time=$new_max_life
preferred_lft=$lease_time
[ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
- ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \
+ ip -4 addr change ${new_ip_address}/${new_subnet_mask} broadcast ${new_broadcast_address} dev ${interface} \
${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
>/dev/null 2>&1
;;