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/08/09 15:32] – [Method 1: Store the lease database on permanent storage] -grammar 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 |
\\ | \\ | ||
Line 16: | Line 16: | ||
</ | </ | ||
- 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, | + | \\ \\ For example, in the Init field in the [[admin-scripts|Scripts]] menu, enter:\\ |
<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 51: | Line 52: | ||
\\ | \\ | ||
- | Method 2 can be used with any type of storage, including JFFS. When using USB (only), an alternative is to enter the above configuration lines into the //Run after mounting// | + | 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// |
\\ | \\ |