Blame SOURCES/0338-network-dhclient-script.sh-fix-RENEW.patch

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