diff --git a/network/qubes-firewall b/network/qubes-firewall index 0b8da66..9f8aa44 100755 --- a/network/qubes-firewall +++ b/network/qubes-firewall @@ -41,11 +41,13 @@ while true; do 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 || true` - echo "Failed applying rules for $i: $ERRS" >&2 - OUT="$OUT$ERRS" + if [ -n "$ERRS" ]; then + echo "Failed applying rules for $i: $ERRS" >&2 + OUT="$OUT$ERRS" + fi done /usr/bin/xenstore-write $XENSTORE_ERROR "$OUT" - if [ "$OUT" ]; then + if [ -n "$OUT" ]; then DISPLAY=:0 /usr/bin/notify-send -t 3000 "Firewall loading error ($HOSTNAME)" "$OUT" || : fi