[Olsr-dev] Reloading DNS server hosts file from nameserver plugin
Andrés Ambrois
(spam-protected)
Wed May 7 00:39:57 CEST 2008
On Tuesday 06 May 2008 17:27:56 Hannes Gredler wrote:
> hi andres,
>
> both of your patches look good. may i ask you in addition
> to tweak also the README_NAMESERVICE file and
> document your parameters and also include the rationale
> (as per your email below) in the file.
>
> perhaps a commented sample configuration for dnsmasq
> would be even better and for sure increase adoption.
>
> tx,
>
> /hannes
>
Here goes the patch to the documentation.
The dnsmasq.conf is already thoroughly commented (at least in the Debian and
Ubuntu packages) and no special tweaking is really necessary for it to work
with olsrd, so I didn't think it's necessary to add one.
Cheers
--
-Andrés
diff -r 5f04f760cc5c lib/nameservice/README_NAMESERVICE
--- a/lib/nameservice/README_NAMESERVICE Mon May 05 11:09:39 2008 +0200
+++ b/lib/nameservice/README_NAMESERVICE Tue May 06 19:31:36 2008 -0300
@@ -100,6 +100,23 @@ PlParam "latlon-infile" "name-of-input.t
by a walking GPS receiver. Just write comma separated decimal
latitude and longitude to this file. Will overwrite the
"lat" and "lon" parameters during runtime.
+
+PlParam "sighup-pid-file" "/path/to/pidfile.pid"
+ (*nix systems only) Sends a HUP signal to the process specified
+ by the pidfile (usually /var/run/dnsmasq.pid) when the host name
+ table changes. This is useful for letting dnsmasq or bind know
+ they have to reload their hosts file.
+
+PlParam "name-change-script" "/path/to/script"
+ Script to execute when there is a change in the hosts names
+ table. Useful for executing a script that uses the hosts file
+ to keep a website or a database updated.
+
+PlParam "services-change-script" "/path/to/script"
+ Similar to the previous parameter. Script to execute when there
+ is a change in the services list propagated by the nameserver
+ plugin. Useful for executing a script that uses the services file
+ to keep a website or a database updated.
---------------------------------------------------------------------
SAMPLE CONFIG
@@ -135,14 +152,22 @@ UNIX VARIANTS:
if you want to make the names available via ordinary DNS
you can use dnsmasq to read the hosts file and serve it to
users. add "addn-hosts=/var/run/hosts_olsr" to dnsmasq.conf
- and restart dnsmasq
+ and:
+ PlParam "sighup-pid-file" "/var/run/dnsmasq.pid"
+
+ to your nameservice plugin configuration.
+
+ This is especially usefull for infrastructure mesh networks that
+ can't afford to run olsrd on all the clients but wish to provide
+ DNS to them. This is solved by running dnsmasq and olsrd with
+ this setup on "edge" nodes that provide connectivity.
WINDOWS:
* overwrite C:\WINDOWS\system32\drivers\etc\hosts
be sure you have nothing in the file which you still need
and configure the plugin with
- PlParam "filename" "C:\WINDOWS\system32\drivers\etc\hosts"
+ PlParam "hosts-file" "C:\WINDOWS\system32\drivers\etc\hosts"
---------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20080506/4991fb66/attachment.sig>
More information about the Olsr-dev
mailing list