Subject: auto-update ipf.conf
To: netbsd-help <netbsd-help@netbsd.org>
From: Matt Herzog <mherzog@attbi.com>
List: netbsd-help
Date: 07/07/2002 16:02:19
Hi All.

I'm trying to find a safe way to update my ipf.conf file automatically when
I get a new IP address from my dhcp server. I seem to keep the same IP for
up to a year sometimes so this is not a critical thing. I just feel like I 
ought to be able to do it.

I can't figure out how or when to trigger the sed edit of the file. I know
syslog will be informed of the ip changing so I guess I could have a cron
job grepping /var/log/messages for "^bound" or something. ifconfig ex0
would get me the IP but the script wouldn't know it's a -new- ip. If I 
put the current IP address in a script and then get the script to do its 
thing based upon any change in that numerical string, I'll have to redeit 
the script every time my ip changes. Someone on efnet #netbsd mentioned 
some dhclient-script option that might help. So far it's eluded me.


-- 
Matthew Herzog

Powered by NetBSD		 :www.netbsd.org: