Linda,
Why don't you try this. It works for me on eth0, so it ought to work
for ppp0 also. I tested it in a script. Be extra careful to get the
forward and backward quote marks right.
KETH0=`ifconfig eth0 | grep 'inet addr' | sed 's/^.*inet addr://;s/
.*$//'`
echo "KETH0=$KETH0"
- Bob Glover
> From: "linda hanigan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: firewall script question
> Date: Tue, 30 Jan 2001 23:45:58 -0600
> charset="iso-8859-1"
> Reply-To: [EMAIL PROTECTED]
>
> Hi All,
> Still trying to do a firewall. I have the following to try and capture the
> ipaddress from ifconfig
>
> EXTERNAL_INTERFACE="ppp0" #Internet connected interface
> IPADDR=`/sbin/ifconfig $EXTERNAL_INTERFACE | grep "inet addr:" | \awk -F:
> {'print '} | cut -d\ -f 1`
> echo "EXTERNAL_INTERFACE: ${EXTERNAL_INTERFACE} on ${IPADDR}"
>
> however the script output is
>
> EXTERNAL_INTERFACE: ppp0 on
>
> Now if I run
> /sbin/ifconfig ppp0 | grep "inet addr:" | \awk -F: {'print '} | cut -d\ -f 1
> from a prompt it gives the ipaddress - what am I doing wrong.
> Thanks
> Linda Hanigan
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list