Blame SOURCES/0252-network-dhclient-script.sh-add-RENEW-REBIND.patch

712866
From efe5301ab91a0e871f2c68faf1f835f306388690 Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Wed, 1 Jul 2015 14:53:33 +0200
712866
Subject: [PATCH] network/dhclient-script.sh: add RENEW/REBIND
712866
712866
(cherry picked from commit cf627b20d039c527f4de167e38978d4984e4d727)
712866
---
712866
 modules.d/40network/dhclient-script.sh | 23 +++++++++++++++++++++++
712866
 1 file changed, 23 insertions(+)
712866
712866
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
5c6c2a
index aef94d6c..d96f7d94 100755
712866
--- a/modules.d/40network/dhclient-script.sh
712866
+++ b/modules.d/40network/dhclient-script.sh
712866
@@ -131,6 +131,17 @@ case $reason in
712866
         >/tmp/net.$netif.up
712866
         ;;
712866
 
712866
+    RENEW|REBIND)
712866
+        unset lease_time
712866
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
712866
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
712866
+        preferred_lft=$lease_time
712866
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
712866
+        ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \
712866
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
712866
+           >/dev/null 2>&1
712866
+        ;;
712866
+
712866
     BOUND6)
712866
         echo "dhcp: BOND6 setting $netif"
712866
         setup_interface6
712866
@@ -151,6 +162,18 @@ case $reason in
712866
         echo "[ -f /tmp/net.$netif.did-setup ]" > $hookdir/initqueue/finished/dhclient-$netif.sh
712866
         >/tmp/net.$netif.up
712866
         ;;
712866
+
712866
+    RENEW6|REBIND6)
712866
+        unset lease_time
712866
+        [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time
712866
+        [ -n "$new_max_life" ] && lease_time=$new_max_life
712866
+        preferred_lft=$lease_time
712866
+        [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life
712866
+        ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} dev ${interface} scope global \
712866
+           ${lease_time:+valid_lft $lease_time} ${preferred_lft:+preferred_lft ${preferred_lft}} \
712866
+           >/dev/null 2>&1
712866
+        ;;
712866
+
712866
     *) echo "dhcp: $reason";;
712866
 esac
712866