From 57878957944999c8917be95e8845a50e94f49bec Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 16:10:13 +0100 Subject: [PATCH 1/3] stop an extra `h` being added to leasetime of DHCP server. We already storethe `h` in `setupVars.conf` Signed-off-by: Adam Warner --- advanced/Scripts/webpage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 9d101482..a72a0709 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -264,7 +264,7 @@ ProcessDHCPSettings() { leasetime="24h" change_setting "DHCP_LEASETIME" "${leasetime}" else - leasetime="${DHCP_LEASETIME}h" + leasetime="${DHCP_LEASETIME}" fi # Write settings to file From 4fb66e632fbb35e72af2f08e37b3e6c6f6c5534b Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 16:30:03 +0100 Subject: [PATCH 2/3] The other h --- advanced/Scripts/webpage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index a72a0709..b0d88284 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -261,10 +261,10 @@ ProcessDHCPSettings() { if [[ "${DHCP_LEASETIME}" == "0" ]]; then leasetime="infinite" elif [[ "${DHCP_LEASETIME}" == "" ]]; then - leasetime="24h" + leasetime="24" change_setting "DHCP_LEASETIME" "${leasetime}" else - leasetime="${DHCP_LEASETIME}" + leasetime="${DHCP_LEASETIME}h" fi # Write settings to file From 0a9965292cd0918477b186c1f2981979c67e1933 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 28 Jul 2017 19:40:13 +0100 Subject: [PATCH 3/3] Additional check to fix any existing cases of "24h" in setupVars.conf automatically. Signed-off-by: Adam Warner --- advanced/Scripts/webpage.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index b0d88284..560bebd0 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -263,6 +263,11 @@ ProcessDHCPSettings() { elif [[ "${DHCP_LEASETIME}" == "" ]]; then leasetime="24" change_setting "DHCP_LEASETIME" "${leasetime}" + elif [[ "${DHCP_LEASETIME}" == "24h" ]]; then + #Installation is affected by known bug, introduced in a previous version. + #This will automatically clean up setupVars.conf and remove the unnecessary "h" + leasetime="24" + change_setting "DHCP_LEASETIME" "${leasetime}" else leasetime="${DHCP_LEASETIME}h" fi