Fix default DHCPv4 leasetime value (#4956)

pull/4966/head
Adam Warner 2 years ago committed by GitHub
commit 77f0012f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -393,13 +393,8 @@ ProcessDHCPSettings() {
if [[ "${DHCP_LEASETIME}" == "0" ]]; then
leasetime="infinite"
elif [[ "${DHCP_LEASETIME}" == "" ]]; then
leasetime="24"
addOrEditKeyValPair "${setupVars}" "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"
addOrEditKeyValPair "${setupVars}" "DHCP_LEASETIME" "${leasetime}"
leasetime="24h"
addOrEditKeyValPair "${setupVars}" "DHCP_LEASETIME" "24"
else
leasetime="${DHCP_LEASETIME}h"
fi

Loading…
Cancel
Save