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

Sébastien G sebastien at alternatives.ca
Fri Mar 5 15:46:57 GMT 2010


Santiago Zarate a écrit :
> Hmm, in my organization we have a database with the macadresses,  (and
> the whole computer in fact), we have already a naming scheme for every
> computer (for example, DSA its for a particular departament, or DIC
> which is for the IT departament... so, the hostname could be sometimes
> DIC-01-<serial-number>) which is the one we use to generate hostnames
> automatically... so when we add a new host, only that line gets into
> the file and its just reloaded...
> 

here, we don't have this level of organisation of the inventory :)
before installing new host. *After* the host is installed the specs of
the host are push using oscinventory.  The problem is for *new* host not
yet in the inventory system. They don't have names yet, I need to
generate one or manually assign one, we voted to automatically generate
one using the mac address of the new host.  Everything we can do to work
less is good. :)

>>
>> Doing a restart of the service in this script doesn't sound "right" to
>> me. but well...
> 
> 
> I'm Ok with having to restart DNSMASQ everytime this happens, but
> actually... i would love dnsmasq to automatically refresh the
> addresses/macaddresses/etc/ without the need of a restart (and without
> adding a particular hostname/ip to /etc/hosts.
> 

Now, I understand from other posts on the list, it's not a big deal to
restart the deamon using a script in the dhcp-script parameter.  So, I
try that.

Sébastien




More information about the Dnsmasq-discuss mailing list