Re: Dynamic IP Address
On Mon, Mar 26, 2001 at 12:17:01PM +0100, Michael Boyd wrote:
> Hello all,
hi!
[...]
> I have had a few of problems and hope you can help...
only the first one, that one is easy :-)
> 1. I obtain a dynamic IP address from my ISP. How can I include this in
> my ruleset? I have experimented with...
>
> $dynipadd="`/sbin/ifconfig ppp0 | grep 'inet addr' | awk '{print$2}' |
> sed -e 's/.*://'`"
when you define a variable, you must not write a '$' in front of it. the
above line should read:
dynipadd="`ifconfig ppp0|grep 'inet addr'|awk '{print$2}'|sed -e '/.*://'`"
if ur networkdevice is ppp0 this should work (u shld add the path to
ifconfig, i didn't in order to sqeeze it in a line :-)
HTH
m
--
"Unix gives you just enough rope to hang yourself -- and then a
couple more feet, just to be sure." Eric Allman
Reply to: