Re: Using dhclient to update zoneedit with my dynamic IP address

2004-02-15 Thread Lowell Gilbert
JJB [EMAIL PROTECTED] writes:

 Thanks for this sample, but it exceeds my script coding ability.
 I added some comments to your sample but I may be lost.
 
 #!/bin/sh
 
 updater_prog = /usr/local/bin/noip2# program to run
 if [ x$reason = xREBOOT ]   ||\  #  is this an reboot or
[ x$old_ip_address = x ] ||\  #  old ip field empty or
[ x$old_ip_address != x$new_ip_address ]; then   #  old not EQ new  then
 if [ -x $updater_prog ]; then# don't know what this does

That tests whether the program exists and is executable.

   ${updater_prog} -i $new_ip_address# exec program
 fi
 fi
 
 For my purposes I think this is what I need.
 This way zoneedit is only updated when ip changes.
 Do I have script correct?
 
 /etc/dhclient-exit-hooks.shwith this content
 #!/bin/sh
 # This script only gets called when dhclient runs
 # (IE: boot and lease expire)
 # Old and new ip  address fields are populated by dhclient,
 # which keeps the old used IP address in some config file
 # so it's not lost on reboot and can be read in at boot time to
 # determine if the ip has changed. So with cable or dsl modem
 # that stays powered on while PC is powered off still is
 # using old IP address.
 
 updater_prog = /usr/local/bin/wgetrest of command   # my wget pgm
 
 if [ x$old_ip_address != x$new_ip_address ];   # old not EQ new
   then ${updater_prog} # exec my pgm
 fi

Looks like that should work...
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Using dhclient to update zoneedit with my dynamic IP address

2004-02-15 Thread JJB
Thanks for the in-sight into the script code.

I could not get the /etc/dhclient-exit-hooks.sh to run at reboot.

After doing some research I found that dhclient-script
was checking for /etc/dhclient-exit-hooks.

Changed /etc/dhclient-exit-hooks.sh to /etc/dhclient-exit-hooks
and it worked.

Thanks again

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Lowell Gilbert
Sent: Sunday, February 15, 2004 8:04 AM
To: [EMAIL PROTECTED]
Cc: Lowell Gilbert; [EMAIL PROTECTED] ORG
Subject: Re: Using dhclient to update zoneedit with my dynamic IP
address

JJB [EMAIL PROTECTED] writes:

 Thanks for this sample, but it exceeds my script coding ability.
 I added some comments to your sample but I may be lost.

 #!/bin/sh

 updater_prog = /usr/local/bin/noip2# program to run
 if [ x$reason = xREBOOT ]   ||\  #  is this an reboot
or
[ x$old_ip_address = x ] ||\  #  old ip field empty
or
[ x$old_ip_address != x$new_ip_address ]; then   #  old not EQ
new  then
 if [ -x $updater_prog ]; then# don't know what
this does

That tests whether the program exists and is executable.

   ${updater_prog} -i $new_ip_address# exec program
 fi
 fi

 For my purposes I think this is what I need.
 This way zoneedit is only updated when ip changes.
 Do I have script correct?

 /etc/dhclient-exit-hooks.shwith this content
 #!/bin/sh
 # This script only gets called when dhclient runs
 # (IE: boot and lease expire)
 # Old and new ip  address fields are populated by dhclient,
 # which keeps the old used IP address in some config file
 # so it's not lost on reboot and can be read in at boot time to
 # determine if the ip has changed. So with cable or dsl modem
 # that stays powered on while PC is powered off still is
 # using old IP address.

 updater_prog = /usr/local/bin/wgetrest of command   # my wget
pgm

 if [ x$old_ip_address != x$new_ip_address ];   # old not EQ new
   then ${updater_prog} # exec my pgm
 fi

Looks like that should work...

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using dhclient to update zoneedit with my dynamic IP address

2004-02-13 Thread Ceri Davies
On Thu, Feb 12, 2004 at 05:32:42PM -0500, JJB wrote:
 The zonedeit FAQ says this command can be used in dhclient to
 update my dynamic ip address at zoneedit when ever dhclient
 gets an new IP lease from my ISP.
 
 wget -O - --http-user=username --http-passwd=password
 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'
 
 Anybody doing this, or know what to add to /etc/dhclient.conf to make this
 happen

Check the manpage for dhclient-script, specifically regarding the BOUND
hook and /etc/dhclient-exit-hooks.

Ceri

-- 


pgp0.pgp
Description: PGP signature


RE: Using dhclient to update zoneedit with my dynamic IP address

2004-02-13 Thread JJB
Ceri

Thanks for the pointer to the 'man dhclient-script'.

I read through it 3-5 times and the best I can make out of what
it says is, that if I create an file like this
/etc/dhclient-exit-hooks.sh with this content

#! /bin/sh
wget -O - --http-user=username --http-passwd=password,
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com
'

Then every time dhclient runs (IE: at bootup and lease expire)
the dhclient-exit-hooks.sh gets run.

I this the correct interpretation?

My wget command does not need the ip address or even know that it
changed, the event of running and making contact with the zoneedit
site will give zoneedit the ip address value of the system
requesting the http url request. I just need this to be launched at
the correct time and dhclient is the correct facility and timing to
do this.

Any help would be greatly approached

Joe



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ceri Davies
Sent: Friday, February 13, 2004 1:17 PM
To: JJB
Cc: [EMAIL PROTECTED] ORG
Subject: Re: Using dhclient to update zoneedit with my dynamic IP
address

On Thu, Feb 12, 2004 at 05:32:42PM -0500, JJB wrote:
 The zonedeit FAQ says this command can be used in dhclient to
 update my dynamic ip address at zoneedit when ever dhclient
 gets an new IP lease from my ISP.

 wget -O - --http-user=username --http-passwd=password

'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com
'

 Anybody doing this, or know what to add to /etc/dhclient.conf to
make this
 happen

Check the manpage for dhclient-script, specifically regarding the
BOUND
hook and /etc/dhclient-exit-hooks.

Ceri

--

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Using dhclient to update zoneedit with my dynamic IP address

2004-02-13 Thread Lowell Gilbert
JJB [EMAIL PROTECTED] writes:

 Thanks for the pointer to the 'man dhclient-script'.
 
 I read through it 3-5 times and the best I can make out of what
 it says is, that if I create an file like this
 /etc/dhclient-exit-hooks.sh with this content
 
 #! /bin/sh
 wget -O - --http-user=username --http-passwd=password,
 'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com
 '
 
 Then every time dhclient runs (IE: at bootup and lease expire)
 the dhclient-exit-hooks.sh gets run.

Yes.

As another example, my own script for a similar purpose:
#!/bin/sh

updater_prog = /usr/local/bin/noip2 
if [ x$reason = xREBOOT ]   ||  \
   [ x$old_ip_address = x ] ||  \
   [ x$old_ip_address != x$new_ip_address ]; then
if [ -x $updater_prog ]; then 
${updater_prog} -i $new_ip_address
fi
fi


-- 
Lowell Gilbert, embedded/networking software engineer, Boston area: 
resume/CV at http://be-well.ilk.org:8088/~lowell/resume/
username/password public
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Using dhclient to update zoneedit with my dynamic IP address

2004-02-13 Thread JJB
Thanks for this sample, but it exceeds my script coding ability.
I added some comments to your sample but I may be lost.

#!/bin/sh

updater_prog = /usr/local/bin/noip2# program to run
if [ x$reason = xREBOOT ]   ||  \  #  is this an reboot or
   [ x$old_ip_address = x ] ||  \  #  old ip field empty or
   [ x$old_ip_address != x$new_ip_address ]; then   #  old not EQ
new  then
if [ -x $updater_prog ]; then# don't know what
this does
${updater_prog} -i $new_ip_address# exec program
fi
fi

For my purposes I think this is what I need.
This way zoneedit is only updated when ip changes.
Do I have script correct?

/etc/dhclient-exit-hooks.shwith this content
#!/bin/sh
# This script only gets called when dhclient runs
# (IE: boot and lease expire)
# Old and new ip  address fields are populated by dhclient,
# which keeps the old used IP address in some config file
# so it's not lost on reboot and can be read in at boot time to
# determine if the ip has changed. So with cable or dsl modem
# that stays powered on while PC is powered off still is
# using old IP address.

updater_prog = /usr/local/bin/wgetrest of command   # my wget
pgm

if [ x$old_ip_address != x$new_ip_address ];   # old not EQ new
then ${updater_prog} # exec my pgm
fi


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Lowell
Gilbert
Sent: Friday, February 13, 2004 2:24 PM
To: [EMAIL PROTECTED]
Cc: Ceri Davies; [EMAIL PROTECTED] ORG
Subject: Re: Using dhclient to update zoneedit with my dynamic IP
address

JJB [EMAIL PROTECTED] writes:

 Thanks for the pointer to the 'man dhclient-script'.

 I read through it 3-5 times and the best I can make out of what
 it says is, that if I create an file like this
 /etc/dhclient-exit-hooks.sh with this content

 #! /bin/sh
 wget -O - --http-user=username --http-passwd=password,

'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com
 '

 Then every time dhclient runs (IE: at bootup and lease expire)
 the dhclient-exit-hooks.sh gets run.

Yes.

As another example, my own script for a similar purpose:

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Using dhclient to update zoneedit with my dynamic IP address

2004-02-12 Thread JJB
The zonedeit FAQ says this command can be used in dhclient to
update my dynamic ip address at zoneedit when ever dhclient
gets an new IP lease from my ISP.

wget -O - --http-user=username --http-passwd=password
'http://dynamic.zoneedit.com/auth/dynamic.html?host=www.mydomain.com'

Anybody doing this, or know what to add to /etc/dhclient.conf to make this
happen
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]