[1732] in Moira
dhcp.sh patch
daemon@ATHENA.MIT.EDU (Nick Martin)
Tue Jan 16 00:39:19 2001
Date: Tue, 16 Jan 2001 00:39:11 -0500
From: Nick Martin <nim@MIT.EDU>
To: moiradev@MIT.EDU
Message-ID: <20010116003910.A22749@blargh.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
this patch causes the dhcp dcm to kill and restart dhcpd.
Index: dhcp.sh
===================================================================
RCS file: /mit/moiradev/repository/moira/gen/dhcp.sh,v
retrieving revision 1.2
diff -u -r1.2 dhcp.sh
--- dhcp.sh 2000/08/17 02:29:49 1.2
+++ dhcp.sh 2001/01/16 05:38:09
@@ -19,6 +19,9 @@
BOOTHEAD=/var/boot/dhcpd.conf.head
BOOTFOOT=/var/boot/dhcpd.conf.foot
BOOTFILE=/var/boot/dhcpd.conf
+LEASEFILE=/var/boot/dhcpd.leases
+PIDFILE=/var/boot/dhcpd.pid
+BINFILE=/var/boot/dhcpd
PSWDFILE=/var/boot/hp.add
# Alert if the tar file or other needed files do not exist
@@ -38,6 +41,10 @@
# Build full bootptab
cat $BOOTHEAD $BOOTGEN $BOOTFOOT > $BOOTFILE
+
+# kill and rerun dhcpd
+test -f $PIDFILE && kill `cat $PIDFILE`
+test -x $BINFILE && $BINFILE -cf $BOOTFILE -lf $LEASEFILE -pf $PIDFILE
# cleanup
test -f $TARFILE && rm -f $TARFILE
--
Nick Martin, nim@nimlabs.org, http://www.nimlabs.org