From 1b92fc877e2973ec1e3ba2195526f4680929b593 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Mon, 13 Feb 2012 15:47:34 +0100 Subject: [PATCH] vm/firewall: do not fail when one VMs rules failed --- network/qubes_firewall | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/network/qubes_firewall b/network/qubes_firewall index 5a60a07..81dbca7 100755 --- a/network/qubes_firewall +++ b/network/qubes_firewall @@ -29,12 +29,12 @@ while true; do RULES=$(/usr/bin/xenstore-read $XENSTORE_IPTABLES_HEADER) IPTABLES_SAVE=$(/sbin/iptables-save | sed '/^\*filter/,/^COMMIT/d') - OUT=`echo -e "$RULES\n$IPTABLES_SAVE" | /sbin/iptables-restore 2>&1 || :` + OUT=`echo -e "$RULES\n$IPTABLES_SAVE" | /sbin/iptables-restore 2>&1 || true` for i in $(xenstore-list qubes_iptables_domainrules) ; do RULES=$(/usr/bin/xenstore-read qubes_iptables_domainrules/"$i") - ERRS=`echo -e "$RULES" | /sbin/iptables-restore -n 2>&1 || :` - OUT="$OUT""$ERRS" + ERRS=`echo -e "$RULES" | /sbin/iptables-restore -n 2>&1 || true` + OUT="$OUT$ERRS" done /usr/bin/xenstore-write $XENSTORE_ERROR "$OUT" if [ "$OUT" ]; then