]> andersk Git - moira.git/blobdiff - gen/dhcp.sh
update PATH to one that will also work on RHEL5.2
[moira.git] / gen / dhcp.sh
index 086c70dc4b37f8933cbd744e4ee3181da29d6a1d..f9eb635d4eb7c21f61ecdb430eb368aa33efdd14 100755 (executable)
@@ -13,12 +13,15 @@ MR_MISSINGFILE=47836473
 MR_MKCRED=47836474
 MR_TARERR=47836476
 
-PATH=/usr/bin
-TARFILE=/var/tmp/boot.out
+PATH=/usr/bin:/bin
+TARFILE=/var/tmp/dhcp.out
 BOOTGEN=/var/boot/dhcpd.conf.print
 BOOTHEAD=/var/boot/dhcpd.conf.head
 BOOTFOOT=/var/boot/dhcpd.conf.foot
-BOOTFILE=/var/boot/bootptab
+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
@@ -39,6 +42,10 @@ done
 # 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
 test -f $0 && rm -f $0
This page took 0.031878 seconds and 4 git commands to generate.