From: Steve Hess (shess@wheatonma.edu)
Date: Fri Aug 29 2003 - 17:22:32 CDT
We're seeing some difficulty with refresh-dhcpdconf. It is misinterpreting
whether the server has actually stopped when it goes to restart after a
registration. As a result it is not updating as it should and causing
headaches. I've attached the code below that is running as refresh-dhcpdconf.
Is this the latest version of the file? Has anyone else had this issue? Any
suggestions for fixes?
Running Netreg 1.3 with CIDR patch.
Thanks,
Steve
# refresh-dhcpdconf for Netreg
# Belongs at /usr/local/bin/refresh-dhcpdconf
if [ /etc/dhcpd/dhcpd.conf.new -nt /etc/dhcpd/dhcpd.conf ]; then
echo "dhcpd.conf.new is newer than dhcpd.conf...Copying dhcpd.conf to
dhcpd.conf.bak"
cp /etc/dhcpd/dhcpd.conf /etc/dhcpd/dhcpd.conf.bak
echo "Copying dhcpd.conf.new to dhcpd.conf"
cp /etc/dhcpd/dhcpd.conf.new /etc/dhcpd/dhcpd.conf
echo "Reloading the server..."
/usr/sbin/dhcpdctl stop
sleep 1
/usr/sbin/dhcpdctl start
if [ "`ps aux|grep dhcpd|grep -v grep|awk '{print $2}'`" !
= "`cat /var/run/dhcpd.pid`" ]; then
echo "Server start failed...copying .conf to .conf.bad"
cp /etc/dhcpd/dhcpd.conf /etc/dhcpd/dhcpd.conf.bad
echo "Copying dhcpd.conf.bak to dhcpd.conf"
cp /etc/dhcpd/dhcpd.conf.bak /etc/dhcpd/dhcpd.conf
echo "Trying to start the server..."
/usr/sbin/dhcpdctl start
if [ "`ps aux|grep dhcpd|grep -v grep|awk '{print $2}'`" !
= "`cat /var/run/dhcpd.pid`" ]; then
echo "Fatal Error: Server could not start."
fi
fi
fi
**********************************************************************
To unsubscribe from this list, send an e-mail message to
majordomo@southwestern.edu containing a single line with the words:
unsubscribe netreg
Send requests for assistance to: owner-netreg@southwestern.edu
**********************************************************************
This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:40 CDT