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