*** From dhcp-server -- To unsubscribe, see the end of this message. ***

[EMAIL PROTECTED] wrote:
> 
>     *** From dhcp-server -- To unsubscribe, see the end of this message. ***
> 
> Wouldn't it be neat if the server checked for the existence of a
> dhpcd.leases~ file if it was unable to find a dhcpd.leases file, and,
> missing that, made a new dhcpd.leases file?
> 
> Ian Turner
> 

I can't think of why you would want to do this because chances are, if
the file is a *~ file, then its leases have probably expired and it
wouldn't do much good to copy it and try to use it. You might find
yourself with a lot of clients that thought they had valid leases but
the lease file is so old that your RENEW's are NAK'ed.  Maybe this is
what you want?

But perhaps your site does something special that would benefit from
this behavior.  In this case, you might find this a useful option to
hacking source.  Below is the startup script for dhcpd and I added an
extra conditional that checks for the non-existence of the dhcpd.leases
file and the existence of a dhcpd.leases~ file.  If both conditions are
true, the latter filename is copied to the former.  

Be warned - it may be syntactically correct and it may do what you want
it to do, but who knows what effect it may have on the behavior of the
server (or clients).

Cheers!
Matthew
 
# startup for ISC dhcpd
 
case "$1" in
'start')
        # Check for an old lease file
        if [ ! -f /etc/dhcpd.leases -f dhcpd.leases~ ] 
        then
                cp /etc/dhcpd.leases~ /etc/dhcpd.leases
        fi
        # Start dhcpd
        if test -f /etc/dhcpd.conf
        then
                echo "Starting ISC DHCP Server"
                /usr/sbin/dhcpd
        fi
        ;;
esac

-- 
---
------
Matthew Levine
Quality Assurance (Global Alliances)
Cisco Systems, Santa Cruz       http://www.cisco.com/
[EMAIL PROTECTED]       (408) 457 - 5431


------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED]   Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------

Reply via email to