* [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script
@ 2014-11-14 21:30 Jörg Krause
2014-11-14 22:47 ` Arnout Vandecappelle
0 siblings, 1 reply; 4+ messages in thread
From: Jörg Krause @ 2014-11-14 21:30 UTC (permalink / raw)
To: buildroot
dnsmasq does not clean its run-times its run-time files after stopping with
/etc/init.d/S80dnsmasq stop. Do this manually.
Signed-off-by: J?rg Krause <jkrause@posteo.de>
---
package/dnsmasq/S80dnsmasq | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq
index 587751e..b29fff4 100755
--- a/package/dnsmasq/S80dnsmasq
+++ b/package/dnsmasq/S80dnsmasq
@@ -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
--
2.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script
2014-11-14 21:30 [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script Jörg Krause
@ 2014-11-14 22:47 ` Arnout Vandecappelle
2014-11-15 13:25 ` Jörg Krause
0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2014-11-14 22:47 UTC (permalink / raw)
To: buildroot
On 14/11/14 22:30, J?rg Krause wrote:
> dnsmasq does not clean its run-times its run-time files after stopping with
> /etc/init.d/S80dnsmasq stop. Do this manually.
>
> Signed-off-by: J?rg Krause <jkrause@posteo.de>
> ---
> package/dnsmasq/S80dnsmasq | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq
> index 587751e..b29fff4 100755
> --- a/package/dnsmasq/S80dnsmasq
> +++ b/package/dnsmasq/S80dnsmasq
> @@ -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
> ;;
> restart|reload)
> $0 stop
>
--
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script
2014-11-14 22:47 ` Arnout Vandecappelle
@ 2014-11-15 13:25 ` Jörg Krause
2014-11-15 14:05 ` Jörg Krause
0 siblings, 1 reply; 4+ messages in thread
From: Jörg Krause @ 2014-11-15 13:25 UTC (permalink / raw)
To: buildroot
On Fr, 2014-11-14 at 23:47 +0100, Arnout Vandecappelle wrote:
> On 14/11/14 22:30, J?rg Krause wrote:
> > dnsmasq does not clean its run-times its run-time files after stopping with
> > /etc/init.d/S80dnsmasq stop. Do this manually.
> >
> > Signed-off-by: J?rg Krause <jkrause@posteo.de>
> > ---
> > package/dnsmasq/S80dnsmasq | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq
> > index 587751e..b29fff4 100755
> > --- a/package/dnsmasq/S80dnsmasq
> > +++ b/package/dnsmasq/S80dnsmasq
> > @@ -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.
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script
2014-11-15 13:25 ` Jörg Krause
@ 2014-11-15 14:05 ` Jörg Krause
0 siblings, 0 replies; 4+ messages in thread
From: Jörg Krause @ 2014-11-15 14:05 UTC (permalink / raw)
To: buildroot
On Sa, 2014-11-15 at 14:25 +0100, J?rg Krause wrote:
> On Fr, 2014-11-14 at 23:47 +0100, Arnout Vandecappelle wrote:
> > On 14/11/14 22:30, J?rg Krause wrote:
> > > dnsmasq does not clean its run-times its run-time files after stopping with
> > > /etc/init.d/S80dnsmasq stop. Do this manually.
> > >
> > > Signed-off-by: J?rg Krause <jkrause@posteo.de>
> > > ---
> > > package/dnsmasq/S80dnsmasq | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq
> > > index 587751e..b29fff4 100755
> > > --- a/package/dnsmasq/S80dnsmasq
> > > +++ b/package/dnsmasq/S80dnsmasq
> > > @@ -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.
>
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-15 14:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 21:30 [Buildroot] [PATCH 1/1] package/dnsmasq: cleanup run-time files in init script Jörg Krause
2014-11-14 22:47 ` Arnout Vandecappelle
2014-11-15 13:25 ` Jörg Krause
2014-11-15 14:05 ` Jörg Krause
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.