package/dnsmasq: cleanup run-time files in init script
PATCH 1/1 package/dnsmasq: cleanup run-time files in init script
dnsmasq does not clean its run-times its run-time files after stopping with /etc/init.d/S80dnsmasq stop. Do this manually.
--- package/dnsmasq/S80dnsmasq | 3 +++ 1 file changed, 3 insertions(+)
package/dnsmasq/S80dnsmasq +3 -0
@@ -13,6 +13,9 @@ case "$1" in echo -n "Stopping dnsmasq: " start-stop-daemon -K -q -x /usr/sbin/dnsmasq [ $? = 0 ] && echo "OK" || echo "FAIL" + # dnsmasq does not clean its run-time files + rm -f /var/run/dnsmasq.pid + rm -f /var/run/dnsmasq.leases ;; restart|reload) $0 stop
Signature · 1 line
2.1.3
PATCH 1/1 package/dnsmasq: cleanup run-time files in init script
Quoted 13 lines · J?rg Krause
dnsmasq does not clean its run-times its run-time files after stopping with
/etc/init.d/S80dnsmasqstop. Do this manually.Signed-off-by J?rg Krause <[email protected]>--- package/dnsmasq/S80dnsmasq | 3 +++ 1 file changed, 3 insertions(+)package/dnsmasq/S80dnsmasq +0
-0
package/dnsmasq/S80dnsmasq case "$1" in · line 18
Quoted 6 lines
package/dnsmasq/S80dnsmasq +3
-0@@ -13,6 +13,9 @@ case "$1" in echo -n "Stopping dnsmasq: " start-stop-daemon -K -q -x /usr/sbin/dnsmasq [ $? = 0 ] && echo "OK" || echo "FAIL" + # dnsmasq does not clean its run-time files + rm -f /var/run/dnsmasq.pid + rm -f /var/run/dnsmasq.leases
The leases file is read again by dnsmasq when it starts, so it can give the
same addresses. So it shouldn't be removed. In fact, in my setup I even put the leases file in persistent storage.
Regards,
Arnout
Quoted 4 lines
package/dnsmasq/S80dnsmasq +0
-0;; restart|reload) $0 stop
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 package/dnsmasq: cleanup run-time files in init script
Quoted 9 lines · Arnout Vandecappelle
Quoted 8 lines · J?rg Krause
dnsmasq does not clean its run-times its run-time files after stopping with
/etc/init.d/S80dnsmasqstop. Do this manually.Signed-off-by J?rg Krause <[email protected]>--- package/dnsmasq/S80dnsmasq | 3 +++ 1 file changed, 3 insertions(+)
Quoted 15 lines
package/dnsmasq/S80dnsmasq case "$1" in · line 18
Quoted 11 lines
package/dnsmasq/S80dnsmasq +3
-0@@ -13,6 +13,9 @@ case "$1" in echo -n "Stopping dnsmasq: " start-stop-daemon -K -q -x /usr/sbin/dnsmasq [ $? = 0 ] && echo "OK" || echo "FAIL" + # dnsmasq does not clean its run-time files + rm -f /var/run/dnsmasq.pid + rm -f /var/run/dnsmasq.leasesThe leases file is read again by dnsmasq when it starts, so it can give the
same addresses. So it shouldn't be removed. In fact, in my setup I even put the leases file in persistent storage.
For any reason dnsmasq duplicates the leases file. I have a copy in /var/lib/misc/ and one in /var/run/. Not sure why the latter one exists.
PATCH 1/1 package/dnsmasq: cleanup run-time files in init script
Quoted 26 lines · J?rg Krause
Quoted 9 lines · Arnout Vandecappelle
Quoted 8 lines · J?rg Krause
dnsmasq does not clean its run-times its run-time files after stopping with
/etc/init.d/S80dnsmasqstop. Do this manually.Signed-off-by J?rg Krause <[email protected]>--- package/dnsmasq/S80dnsmasq | 3 +++ 1 file changed, 3 insertions(+)Quoted 15 lines
package/dnsmasq/S80dnsmasq case "$1" in · line 18
Quoted 11 lines
package/dnsmasq/S80dnsmasq +3
-0@@ -13,6 +13,9 @@ case "$1" in echo -n "Stopping dnsmasq: " start-stop-daemon -K -q -x /usr/sbin/dnsmasq [ $? = 0 ] && echo "OK" || echo "FAIL" + # dnsmasq does not clean its run-time files + rm -f /var/run/dnsmasq.pid + rm -f /var/run/dnsmasq.leasesThe leases file is read again by dnsmasq when it starts, so it can give the
same addresses. So it shouldn't be removed. In fact, in my setup I even put the leases file in persistent storage.
Quoted 3 lines
For any reason dnsmasq duplicates the leases file. I have a copy in
/var/lib/misc/and one in/var/run/. Not sure why the latter one exists.
Ouch! /var/run and /var/lib/misc both symlinks to /tmp. That's why! So I will remove the removing of the leases file.