ia64/xen-unstable

changeset 7787:980967b0b161

Don't call iptables if it is not installed. This code is only there to ensure
that packets between domU and the bridge are not firewalled, so if iptables is
not installed, then there is no worry.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Fri Nov 11 17:56:02 2005 +0100 (2005-11-11)
parents 1444adb1c407
children e023e37b3c7a 9523e6d10511
files tools/examples/vif-common.sh
line diff
     1.1 --- a/tools/examples/vif-common.sh	Fri Nov 11 17:04:17 2005 +0100
     1.2 +++ b/tools/examples/vif-common.sh	Fri Nov 11 17:56:02 2005 +0100
     1.3 @@ -53,7 +53,8 @@ function frob_iptable()
     1.4      local c="-D"
     1.5    fi
     1.6  
     1.7 -  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT
     1.8 +  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT ||
     1.9 +    fatal "iptables $c FORWARD -m physdev --physdev-in $vif $@ -j ACCEPT failed"
    1.10  }
    1.11  
    1.12  
    1.13 @@ -66,6 +67,11 @@ function frob_iptable()
    1.14  #
    1.15  function handle_iptable()
    1.16  {
    1.17 +  if ! which iptables >&/dev/null
    1.18 +  then
    1.19 +    return
    1.20 +  fi
    1.21 +
    1.22    if [ "$ip" != "" ]
    1.23    then
    1.24        local addr