john at iastate.edu
Wed Mar 30 19:04:35 UTC 2011
> John Hascall wrote:
> > Our solution was to modify dhcpd so that it did not write the
> > OMAPI-provoked host entries into the lease file, since we know
> > they will be in the config file the next time dhcpd is restarted.
> Any chance you have the patch for this? I'd really like to give it a
> try, as we have a very similar warm spare system - though in addition
> ours backs up two masters, one which serves statics only (leases file is
> ignored) and one which serves dynamics.
> IMHO ISC (once again, if anyone's listening) should incorporate the
> patch and add a config file flag to enable it. It would prove very
> useful for those of us who have a established *SQL-backed system but
> just want to add/update hosts without a restart.
> -Jason Antman
> Rutgers University, NJ
It's not much of a patch. In the function write_host() in the file
server/db.c do this:
if (!db_printable (host -> name))
* [ISU] john at iastate.edu 23-Oct-2007
* The line of code below prevents the writing of dynamic
* host entries (those created by OMAPI) from appearing in
* the lease file. They will be present the next time we
* rebuild the config file and restart dhcpd so having them
* written here just makes duplicates.
if (host -> flags & HOST_DECL_DYNAMIC) return 1;
And in includes/site.h add this line:
Obviously, there would be more work to make this a proper option you
can control from the config file.
More information about the dhcp-users