Thanks for the reply. Yes, I would agree that it looks like ash (is that the shell bering uses?) can't handle those large numbers. But what should be done about it? I'm not sure what shell the programmer intended this script be run on.
As for getting the script to be run when the dhcp lease file is updated, I don't see how your suggestion would work. Maybe I'm missing something, but what I want is to have dhcp_2_dns run after the server has changed the dhcp lease file, not after the dhcp client gets a new address (i.e. I want the dhcp server to update the dns server when a new address has been given out on my network). -Mark Ivey- ----- Original Message ----- From: "Erich Titl" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 12, 2002 2:07 AM Subject: Re: [leaf-user] dhcp_2_dns Hi At 06:42 12.09.2002, you wrote: >A while back, I asked the list how I could get my dhcp server to update my >dns server. I finally felt up to the task tonight so I downloaded a script >written by Michael D. Schleif: > <http://leaf.sourceforge.net/devel/helices/scripts/dhcp_2_dns.sh> >I now have 3 questions: > >First, it gives some error messages when I run it: > >[: 20020908084404: out of range >[: 20020912062502: out of range >[: 20020912040952: out of range >[: 20020912042402: out of range > >These are coming from line 174: > > # Lease expired? # 1 > [ $end -lt $current_date ] \ > && continue > [ ${debug:-0} -ne 0 ] && echo "Lease is CURRENT" > >So, any idea how to stop these error messages? I'm running on bering 1.0 rc >3 if that helps. looks like the date strings/numbers are too big for ash ?? >Second, it was suggested that I should run this from cron. Is there any way >to have the dhcp server run it when the lease file is update instead? (I >want to minimize the lag between an address changing and the dns server >being updated) It depends which tool you use as dhcp client. In dhclient you can add an update command to dhclient_exit_hooks, dhcpcd has a file which is executed, IIRC it is called dhcpcd.exe. Pump has a script facility to be defined in pump.conf HTH Erich THINK Püntenstrasse 39 8143 Stallikon mailto:[EMAIL PROTECTED] PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html