Hi,
I am sharing a little tweak that I use to make dhcp leases persist across restarts. I need this because I depend on local dynamic name resolution a lot and when turris restarts it forgets all the local dns entries created based on DHCP hostnames.
The disadvantage of this is more wear on the flash storage but the traffic on my lan is minor and the flash storage is comparatively huge so I am not worried.
You can enable persistant dhcp & dynamic dns records by storing this in /etc/init.d/dhcp-persistance
#!/bin/sh /etc/rc.common
START=15
boot() {
if [ -f /etc/dhcp.leases ]; then
echo "Found persistent leases. Linking /tmp/dhcp.leases to /etc/dhcp.leases"
ln -s /etc/dhcp.leases /tmp/dhcp.leases
fi
}
and running
cp /tmp/dhcp.leases /etc/
/etc/init.d/dhcp-persistance enable