[OLSR-users] DNSMasq and Nameservice plugin

Bernd Petrovitsch (spam-protected)
Wed Jul 12 13:24:00 CEST 2006


On Wed, 2006-07-12 at 21:12 +1000, Dan Flett wrote:
> Hi all,
> 
> Just wondering - is anyone actively using the nameservice plugin in
> conjunction with dnsmasq?
> 
> As you probably know, dnsmasq can serve hosts files via it's DNS server.
> But dnsmasq doesn't automatically poll /etc/hosts - it must receive a SIGHUP
> signal to re-read it.
> 
> The nameservice plugin re-writes /etc/hosts (or other specified output file)
> whenever it receives new information.
> 
> Does anyone have any suggestions as to the best way to keep dnsmasq updated
> whenever /etc/hosts changes, that preferably avoids a race condition?
> 
> My only idea is to set up a cron job to send a SIGHUP to dnsmasq at regular
> intervals.  It'd be nice to have something that is a bit more intelligent.

Standard solution:
- dnsmasq writers a PID file (either on it's own or the startup script)
- The nameservice plugin gets anadditional parameter where one can
  specify the PID filename.
- The nameservice plugin sends a signal if the PID file is given as
  parameter.

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services





More information about the Olsr-users mailing list