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

[Xen-changelog] Don't call iptables if it is not installed. This code is only there to ensure



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 980967b0b161aa2a0d77066c5c43afa1c4e3a14c
# Parent  1444adb1c407d6030a2c294976991414b47487d5
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@xxxxxxxxxxxxx>

diff -r 1444adb1c407 -r 980967b0b161 tools/examples/vif-common.sh
--- a/tools/examples/vif-common.sh      Fri Nov 11 16:04:17 2005
+++ b/tools/examples/vif-common.sh      Fri Nov 11 16:56:02 2005
@@ -53,7 +53,8 @@
     local c="-D"
   fi
 
-  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT
+  iptables "$c" FORWARD -m physdev --physdev-in "$vif" "$@" -j ACCEPT ||
+    fatal "iptables $c FORWARD -m physdev --physdev-in $vif $@ -j ACCEPT 
failed"
 }
 
 
@@ -66,6 +67,11 @@
 #
 function handle_iptable()
 {
+  if ! which iptables >&/dev/null
+  then
+    return
+  fi
+
   if [ "$ip" != "" ]
   then
       local addr

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.