RE: NetReg: What is Latest Version of refresh-dhcpdconf?

New Message Reply Date view Thread view Subject view Author view Attachment view

From: Lavengood, Michael (MLavengood@franklincollege.edu)
Date: Thu Sep 11 2003 - 10:22:45 CDT


We are having the same problem. I have checked my refresh-dhcpdconf and
it is the same as that posted. Has anyone else found a solution for
this?

Thanks,
 
Michael Lavengood
 
Network Security Administrator
 
Franklin College
501 East Monroe Street
Franklin, Indiana 46131
 
mlavengood@franklincollege.edu
http://www.franklincollege.edu
http://www.franklincollege.edu/pwp/mlavengood
 

-----Original Message-----
From: Steve Hideg [mailto:hideg@saintmarys.edu]
Sent: Friday, August 29, 2003 7:11 PM
To: netreg@southwestern.edu
Subject: RE: NetReg: What is Latest Version of refresh-dhcpdconf?

I wrote a version of refresh-dhcpdconf in Perl. I'm willing to share
if anyone is interested.

++$Steve;

At 7:54 PM -0400 8/29/03, King, Michael wrote:
>This is what I'm running, 1.3 with CIDR.
>
>I added the extralines to copy dhcpd.conf.bak to dhcpd.conf.new, so
that it
>wouldn't still have the error in .new. That way, registrations after
the
>server came backup wouldn't keep taking it down.
>
>There was a better version of refresh-dhcpdconf put on the mailing
list, I
>just never copied it.
>
>Mike
>
>#!/bin/bash
>
># 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.new"
> cp /etc/dhcpd/dhcpd.conf.bak /etc/dhcpd/dhcpd.conf.new
> 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
>
>
>-----Original Message-----
>From: Steve Hess [mailto:shess@wheatonma.edu]
>Sent: Friday, August 29, 2003 6:23 PM
>To: netreg@southwestern.edu
>Subject: NetReg: What is Latest Version of refresh-dhcpdconf?
>
>
># 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
**********************************************************************
**********************************************************************
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
**********************************************************************


New Message Reply Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.4 : Thu Aug 12 2004 - 12:01:40 CDT