Xentrk
Part of the Furniture
dhcpstaticlist.sh is a helpful utility script to manage DHCP static leases. The script is only compatible with 384.13 release. The script displays a menu with the following functions:
Installation
Menu
Documentation on the script and other utilities I wrote are available at:
https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts
- Save nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp. This will allow you to restore the values after performing a factory reset.
- Restore nvram dhcp_staticlist and dhcp_hostnames from /opt/tmp/.
- Preview dhcp_staticlist and dhcp_hostnames in dnsmasq format.
- Append Output DHCP Static List to /jffs/configs/dnsmasq.conf.add & Disable Manual Assignment in the WAN GUI. You will then be prompted to reboot the router to have the settings take effect.
- Disable DHCP Manual Assignment.
- Enable DHCP Manual Assignment.
- Backup nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/ and clear nvram values.
- Display character size of dhcp_staticlist and dhcp_hostnames.
Installation
Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts/master/dhcpstaticlist.sh" -o "/jffs/scripts/dhcpstaticlist.sh" && chmod 755 /jffs/scripts/dhcpstaticlist.sh && sh /jffs/scripts/dhcpstaticlist.sh
Menu
Code:
Use this utility to save or restore dhcp_staticlist and dhcp_hostnames nvram values
[1] - Save nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/
[2] - Restore nvram dhcp_staticlist and dhcp_hostnames from /opt/tmp/
[3] - Preview dhcp_staticlist and dhcp_hostnames in dnsmasq format
[4] - Append dhcp_staticlist and dhcp_hostnames to dnsmasq.conf.add & Disable DHCP Manual Assignment
[5] - Disable DHCP Manual Assignment
[6] - Enable DHCP Manual Assignment
[7] - Backup nvram dhcp_staticlist and dhcp_hostnames to /opt/tmp/ and clear nvram values
[8] - Display character size of dhcp_staticlist and dhcp_hostnames (2999 is the limit)
[e] - Exit
==>
Documentation on the script and other utilities I wrote are available at:
https://github.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts
Last edited: