Blame 0010-network-dhclient-script.sh-make-IPv4-DHCP-lease-time.patch

Harald Hoyer 0840a3
From 0f89ec314b062a410199251db0356a55b4773173 Mon Sep 17 00:00:00 2001
Harald Hoyer 0840a3
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 0840a3
Date: Wed, 1 Jul 2015 14:57:15 +0200
Harald Hoyer 0840a3
Subject: [PATCH] network/dhclient-script.sh: make IPv4 DHCP lease time
Harald Hoyer 0840a3
 optionally
Harald Hoyer 0840a3
Harald Hoyer 0840a3
If bootp is used, no lease time is provided in the packet from the bootp
Harald Hoyer 0840a3
server.
Harald Hoyer 0840a3
---
Harald Hoyer 0840a3
 modules.d/40network/dhclient-script.sh | 6 +++---
Harald Hoyer 0840a3
 1 file changed, 3 insertions(+), 3 deletions(-)
Harald Hoyer 0840a3
Harald Hoyer 0840a3
diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
Harald Hoyer 0840a3
index 320208b..a8b5b89 100755
Harald Hoyer 0840a3
--- a/modules.d/40network/dhclient-script.sh
Harald Hoyer 0840a3
+++ b/modules.d/40network/dhclient-script.sh
Harald Hoyer 0840a3
@@ -39,9 +39,9 @@ setup_interface() {
Harald Hoyer 0840a3
         fi
Harald Hoyer 0840a3
     fi
Harald Hoyer 0840a3
 
Harald Hoyer 0840a3
-    ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} \
Harald Hoyer 0840a3
-        valid_lft ${lease_time} preferred_lft ${lease_time} \
Harald Hoyer 0840a3
-        dev $netif
Harald Hoyer 0840a3
+    ip addr add $ip${mask:+/$mask} ${bcast:+broadcast $bcast} dev $netif \
Harald Hoyer 0840a3
+        ${lease_time:+valid_lft $lease_time} \
Harald Hoyer 0840a3
+        ${preferred_lft:+preferred_lft ${preferred_lft}}
Harald Hoyer 0840a3
 
Harald Hoyer 0840a3
     if [ -n "$gw" ] ; then
Harald Hoyer 0840a3
         if [ "$mask" == "255.255.255.255" ] ; then