|
persist OMAPI host declarations
I have a dhcp server that is locked down so that only known hosts can obtain an IP address. I need to be able to (remotely through a script) add and remove hosts on the server with minimal impact.
I could just rebuild the host declarations in the dhcpd.conf file, upload the modified version over ftp and restart the dhcpd daemon, but I feel that leaves an awful lot of room for error (file corruption). Instead I've been looking at OMAPI which lets me add, delete and modify leases and hosts on the server without shutting it down. When I create a new host, the host declaration is written to the dhcpd.leases file (not the .conf file). This works very well....until the server restarts, at which point all the host declarations in the leases file are wiped.
Now I don't anticipate the server going down all that often, but this is a provisioning server for a network of cable modems. If the network loses power at 1 am, I need it to pop back up and resume normal operation without me having to resend the host list to the server.
Does anyone know of a way to prevent the service from deleting those declarations when it rotates the lease file? Is there a setting somewhere that I'm missing or do I need to investigate another option?
|