Peter,
Thanks for the reply.
I waited to respond until I had a chance to sit down and
mess with this.
I went into this with the understanding that I can use
the dhclient-script file to run my own scripts in.
I tried and experiment to see if I can get a simple test script to run
and I haven't had any luck.
In dhclient.conf I added :
interface "vr0" {
script "/etc/dhclient-script";
}
In dhclient-script I added
echo 'this is a test' > testecho
dhclient-script had permissions 744
My output was:
# sh /etc/netstart
execve (/etc/dhclient-script, ...): Exec format error
exiting.
DHCPREQUEST on vr0 to 255.255.255.255 port 67
DHCPACK from 67.236.64.1 (00:30:88:03:62:b5)
bound to 67.236.124.195 -- renewal in 1800 seconds.
AM WRONG in the idea that I can run shell scripts in
dhclient-script?
My idea had been to run
# ifconfig vr0 > presentIP
then email presentIP back to me.
thanks, Ed
On 24 Oct 2010 at 11:17, Peter Hessler wrote:
> You can setup a script in dhclient.conf, which will run every time
> dhclient gets a lease.
>
> check the man pages for dhclient-script and dhclient.conf.
>
>
>
> On 2010 Oct 23 (Sat) at 21:23:27 -0400 (-0400), Ed D. wrote:
> :Hi Eveybody,
> : I have an AMD64 based OpenBSD 4.6 system in another town that's
> :on a DSL account with a dynamically allocated IP address. : :The DSL
> provider uses standard DHCP to allocate the address, and :I just use a
> dumb modem, :so the DHCP session is done by my OpenBSD box. : :Back
> home at my base location I have a static IP and an :OpenBSD based
> network with web and mail server. : :QUESTION: is there a way for my
> remote OpenBSD box :in the other town, to send me it's new IP address
> when it updates :it's IP address during a DHCP session? : :Or any other
> way that i can know when it's IP address changes and :what the new one
> is? :
_______________________________________________
Openbsd-newbies mailing list
[email protected]
http://mailman.theapt.org/listinfo/openbsd-newbies