OMSHELL to Reload Host Config File or cpan Net::ISC::DHCPd::OMAPI Examples
sholland at sandara.ca
Wed Sep 9 19:04:56 UTC 2009
On Wed, 2009-09-09 at 10:27 -0700, David W. Hankins wrote:
> On Tue, Sep 01, 2009 at 01:20:44PM -0300, Shawn Holland wrote:
> > I was wondering if there is a way to just tell it to 'reload' from a
> > config file.
> unfortunately, no.
> OMAPI gives you the ability to modify a running state (that is saved
> to dhcpd.leases), but this means you have to maintain your own state
> and feed the server 'changes' from one set of configs to the next.
> if you are making config from an oft-refreshed file as a source, i'd
> just recommend restarting dhcpd on a new config file rather than using
> omapi to manage changes. the brief time to restart the daemon will
> pass unnoticed,
Funny that you say this. It is for this reason, having the dhcpd offline
for that brief 1-2 seconds that is causing the intermittent problem.
Which is why I'm looking into OMAPI
I have been successful in implementing a solution using perl / omshell.
It is a bit more work then just updating the included host conf file and
restarting dhcpd, but it allows for no downtime which was my main
It would be interesting if you could use omshell to run a file like the
way mysql can execute a sql script. Then you could just generate a
omshell script and tell omshell to execute all the commands in it.
Thanks for all the information.
Sandara Technologies Ltd.
More information about the dhcp-users