[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Firewalling with DHCP client


On Tue, Jun 12, 2001 at 04:52:44PM -0600, Stefan Srdic wrote:
> # External IP address
> IPADDR=" /sbin/pump --status | grep IP: | sed -e 's/.*IP: //' "
> When I test the filter in the prompt I always get my IP address in return.
> However, when I run it through the netfilter script I always end up with the
> same error:

This is a matter of which type of quotes you use. Some examples from my
promt (I don't have pump installed in this machine)

Casandra:/# IPADDR="ifconfig ippp0 | grep inet"
Casandra:/# echo $IPADDR
ifconfig ippp0 | grep inet

Casandra:/# IPADDR=`ifconfig ippp0 | grep inet`
Casandra:/# echo $IPADDR
inet addr: P-t-P: Mask:

See "man bash" section "Command Substitution".

Hope that helps,

Reply to: