I've ported over some of the shell script & JavaScript code that I initially wrote for YazFi to YazDHCP so that its WebGUI input field for "DHCP Lease" is more user-friendly (for some context/background see this thread here).
This is a summary of the new changes:
1) Maximum DHCP Lease Time is 90 days (minimum lease is the same as before: 2 minutes).
2) You can now enter the "DHCP Lease" value in seconds (e.g. 86400s), minutes (e.g. 720m), hours (e.g. 24h), days (e.g. 10d), or weeks (e.g. 2w). Only positive integer values are allowed so "24.5h" or "2.5d" are *not* valid input. If none of the valid suffixes is given (s, m, h, d, w), the default unit is seconds, so this new change is backward compatible with previously valid settings.
3) Simple mechanism to set an "infinite" DHCP Lease Time value by allowing a single upper-case letter 'I' or a single digit ZERO '0' entry in the WebGUI to indicate that the user wants to set an "infinite" lease time.
Here are example screenshots:
NVRAM setting is then updated accordingly (always in seconds):
I will submit a GitHub PR to @JackYaz so he can review the code changes & merge them into the Develop branch if he agrees with the modifications.
This is a summary of the new changes:
1) Maximum DHCP Lease Time is 90 days (minimum lease is the same as before: 2 minutes).
2) You can now enter the "DHCP Lease" value in seconds (e.g. 86400s), minutes (e.g. 720m), hours (e.g. 24h), days (e.g. 10d), or weeks (e.g. 2w). Only positive integer values are allowed so "24.5h" or "2.5d" are *not* valid input. If none of the valid suffixes is given (s, m, h, d, w), the default unit is seconds, so this new change is backward compatible with previously valid settings.
3) Simple mechanism to set an "infinite" DHCP Lease Time value by allowing a single upper-case letter 'I' or a single digit ZERO '0' entry in the WebGUI to indicate that the user wants to set an "infinite" lease time.
Here are example screenshots:
NVRAM setting is then updated accordingly (always in seconds):
I will submit a GitHub PR to @JackYaz so he can review the code changes & merge them into the Develop branch if he agrees with the modifications.