[Dnsmasq-discuss] generating hostname on the fly, base on mac address,

Helmut Hullen Hullen at t-online.de
Fri Mar 5 17:26:00 GMT 2010


Hallo, Simon,

Du meintest am 05.03.10:

> You could put the name/MAC mappings in a separate file, and load it
> using dhcp-hostsfile.

That's nearly the way I prefer:

In file "/etc/dnsmasq.conf"

        conf-dir=/etc/dnsmasq.d

In directory "/etc/dnsmasq.d"

        file "dhcp.conf"
which contains lines like

  dhcp-host=Thinkpad,192.168.0.41,11:22:33:44:55:66,180d

> You can re-load the contents of that without
> having to restart dnsmasq by sending SIGHUP to the process.

For "sysv" or equivalent rc files:

     case "$1" in
             start)
               # do something
               ;;
             stop)
               # do something
               ;;
             reload)
                 pgrep -x dnsmasq > /dev/null && killall -HUP dnsmasq
                                          # killall for Linux systems
               ;;
             *)
               # do something
               ;;
     esac

Viele Gruesse!
Helmut



More information about the Dnsmasq-discuss mailing list