RE: NetReg: already registered errors

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

From: King, Michael (MKing@bridgew.edu)
Date: Thu Sep 04 2003 - 13:47:59 CDT


That's odd, I just added a sleep 1 into my refresh-dhcpdconf today, because
the server wasn't coming up fast enough, so it would error out also.

-----Original Message-----
From: Steve Hess [mailto:shess@wheatonma.edu]
Sent: Thursday, September 04, 2003 11:55 AM
To: netreg@southwestern.edu
Subject: Re: NetReg: already registered errors

We saw this problem quite a bit until we modified our refresh-dhcpdconf
script. It wasn't giving enough time for the PID's to change and was
thinking the restart of dhcpd failed. As a result the people who
registered would get a Hardware Already Registered error until the
dhcpd.conf.new was successfully copied to dhpcd.conf. Check to see if you
have a dhcpd.conf.bad. If so this may be your problem.

Below is our script:

#!/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 3
   /usr/sbin/dhcpdctl start
   sleep 2
   if [ "`ps aux|grep dhcpd|grep -v grep|grep -v refresh-dhcpdconf|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|grep -v refresh-dhcpdconf|awk
'{print $2}'`" != "`cat /var/run/dhcpd.pid`" ]; then
       echo "Fatal Error: Server could not start."
     fi
   fi
fi
~

At 11:00 AM 9/4/2003 -0400, you wrote:

>Hello,
>
>I have been seeing quite a few poeple getting the
>"Your hardware has already been registered" message
>when they are trying to register more than once computer.
>I understand that if they are behind a personal router they would get
>an error like that, but these people are not. Has anybody seen this
>problem before? Users can have more than one device registered, right?
>
>Thanks.
>
>
>**********************************************************************
>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
**********************************************************************
**********************************************************************
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