This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
retain_dhcp_lease_info_after_a_reboot [2023/06/08 06:33] – [Method 2: Copying the lease database to permanent storage at halt time] -format hogwild | retain_dhcp_lease_info_after_a_reboot [2024/10/31 21:32] (current) – [Method 1: Store the lease database on permanent storage] hogwild | ||
---|---|---|---|
Line 8: | Line 8: | ||
===== Method 1: Store the lease database on permanent storage ===== | ===== Method 1: Store the lease database on permanent storage ===== | ||
- | The first method | + | The first method |
\\ | \\ | ||
- | - Under Advanced, go to to [[:advanced-dhcpdns|DHCP/ | + | - Under Advanced, go to the [[advanced-dhcpdns|DHCP/ |
dhcp-leasefile=/ | dhcp-leasefile=/ | ||
</ | </ | ||
- Use a path relative to your own system. | - Use a path relative to your own system. | ||
- | - Using permanent storage | + | - Using permanent storage |
- | - You will notice | + | - Notice |
===== Method 2: Copying the lease database to permanent storage at halt time ===== | ===== Method 2: Copying the lease database to permanent storage at halt time ===== | ||
- | \\ The second approach | + | The second approach |
- | \\ \\ For example, in the [[admin-scripts|Scripts]] menu, in the Init field, enter:\\ | + | \\ \\ For example, |
<code -> | <code -> | ||
[ -f / | [ -f / | ||
- | sort -b -k 2 -u -z / | + | sort -b -k 2 -u -z / |
- | sort -b -k 2 -u -z / | + | sort -b -k 2 -u -z / |
- | diff -a /tm | + | diff -a /tmp/ |
- | kill -HUP `ps | grep | + | kill -HUP `ps | grep -E [d]nsmasq | awk '{ print $1 }'` |
- | rm / | + | rm / |
- | rm / | + | rm / |
+ | rm -f / | ||
} | } | ||
</ | </ | ||
Line 41: | Line 42: | ||
\\ | \\ | ||
- | In the same menu, in the Halt field, enter:\\ | + | in the //Halt// field In the [[admin-scripts|Scripts]] menu, enter:\\ |
<code -> | <code -> | ||
Line 51: | Line 52: | ||
\\ | \\ | ||
- | The second method | + | Method 2 can be used with any type of storage, including JFFS. When using method 2 only with USB, an alternative is to enter the former set of configuration lines into the //Run after mounting// field and the latter set of lines in the //Run before unmounting// fields in the [[nas-usb|USB |
\\ | \\ |