From 8d09f493a634f0c6c44e99fb22618b75cbb41f0f Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 2 Jul 2015 19:48:25 +0200 Subject: [PATCH] network/dhclient-script.sh: fixup lease time --- modules.d/40network/dhclient-script.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh index a8b5b89..2550caf 100755 --- a/modules.d/40network/dhclient-script.sh +++ b/modules.d/40network/dhclient-script.sh @@ -21,7 +21,10 @@ setup_interface() { search=$(printf -- "$new_domain_search") namesrv=$new_domain_name_servers hostname=$new_host_name - lease_time=$new_dhcp_lease_time + [ -n "$new_dhcp_lease_time" ] && lease_time=$new_dhcp_lease_time + [ -n "$new_max_life" ] && lease_time=$new_max_life + preferred_lft=$lease_time + [ -n "$new_preferred_life" ] && preferred_lft=$new_preferred_life [ -f /tmp/net.$netif.override ] && . /tmp/net.$netif.override