|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Crist J. Clark (cjc
FreeBSD.ORG)Date: Sat Mar 02 2002 - 23:32:42 CST
On Sat, Mar 02, 2002 at 10:40:33PM -0500, Scott M. Nolde wrote:
> George.Giles
mcmail.vanderbilt.edu(George.Giles
mcmail.vanderbilt.edu)
2002.03.01 07:52:26 +0000:
> > How do you get ipfw to pick-up DHCP value for oif in the rc.firewall script
> > ?
> >
Ahhhhhhhhh!!! Are you all _trying_ to hurt me?
> This is what I do:
> onet=`/sbin/ifconfig dc0 | grep -w inet | awk '{print $2}' | awk -F. \
> '{print $1 "." $2 "." $3 ".0"}'`
onet=`/sbin/ifconfig dc0 | awk '/inet / { split($2, ip, /\./); print ip[1]"."ip[2]"."ip[3]".0"; exit }'`
> omask=`grep subnet-mask /var/db/dhclient.leases | tail -1 | sed \
> "s/[,;]//g" | awk '{print $3}'`
omask=`awk '/subnet-mask/ { sub(/;/, "", $3); sm = $3; } END { print sm; }' /var/db/dhclient.leases`
Piping grep(1) into awk(1)... *shiver* It just looks so icky. And
piping grep(1) into awk(1) and then into another awk(1) well, I
just... just... *faint* *thunk*
-- Crist J. Clark | cjclarkalum.mit.edu | cjclark
jhu.edu http://people.freebsd.org/~cjc/ | cjc
freebsd.org
To Unsubscribe: send mail to majordomo
FreeBSD.org with "unsubscribe freebsd-security" in the body of the message
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]