From: Bruce S. <bl...@us...> - 2004-08-02 13:13:30
|
Update of /cvsroot/devil-linux/build/scripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5800/scripts/scripts Modified Files: dhcpd Log Message: Check for "lease-file-name" in /etc/dhcpd.conf and modify args if found. Index: dhcpd =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/scripts/dhcpd,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- dhcpd 8 Sep 2003 20:19:34 -0000 1.10 +++ dhcpd 2 Aug 2004 13:13:20 -0000 1.11 @@ -41,6 +41,14 @@ fi done +leasearg="yes" +DHCPD_CONF=/etc/dhcpd.conf +if [ -f $DHCPD_CONF ]; then + if [ $(grep -ic lease-file-name $DHCPD_CONF) -gt 0 ]; then + leasearg="no" + fi +fi + if [ "$DEVICES" != "" ]; then case "$1" in start) @@ -52,7 +60,11 @@ done echo -n "Starting $NAME on $DEVICES..." - loadproc $DAEMON -lf /etc/dhcpd.leases -q $DEVICES + if [ "$leasearg" = "no" ]; then + loadproc $DAEMON -q $DEVICES + else + loadproc $DAEMON -lf /etc/dhcpd.leases -q $DEVICES + fi ;; stop) for DEVICE in $DEVICES; do |