ia64/xen-unstable

changeset 3700:d2e0edbc060d

bitkeeper revision 1.1159.223.77 (4207bd65yRdFmE9Py8fLUBk3826_Ig)

Minor tidy of vif-nat script.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Mon Feb 07 19:11:33 2005 +0000 (2005-02-07)
parents b555b108ca0d
children b11e02124f71 d683070e3e97
files tools/examples/vif-nat
line diff
     1.1 --- a/tools/examples/vif-nat	Mon Feb 07 18:33:22 2005 +0000
     1.2 +++ b/tools/examples/vif-nat	Mon Feb 07 19:11:33 2005 +0000
     1.3 @@ -37,8 +37,8 @@ domain=${domain:?}
     1.4  vif=${vif:?}
     1.5  ip=${ip:?} 
     1.6  
     1.7 -# better way to strip /netmask from the ip?
     1.8 -vif_ip=`echo ${ip} | awk -F. '{print $1"."$2"."$3"."$4}'`
     1.9 +# strip /netmask
    1.10 +vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
    1.11  
    1.12  main_ip=`ifconfig eth0 | grep "inet addr:" | sed -e 's/.*inet addr:\(\w\w*\.\w\w*\.\w\w*\.\w\w*\).*/\1/'`
    1.13