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:39] – [Method 2: Copying the lease database to permanent storage at halt time] -clarify Method 2 uses both sets of lines 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, in the Init field in the [[admin-scripts|Scripts]] menu, enter:\\ | \\ \\ For example, in the Init field in the [[admin-scripts|Scripts]] menu, enter:\\ | ||
Line 28: | Line 28: | ||
<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 / | ||
} | } | ||
</ | </ |