svn path=/trunk/packages/invirt-iptables/; revision=2905
+invirt-iptables (1.0.1) unstable; urgency=low
+
+ * Make sed not hang when there are no firewall files
+
+ -- Greg Brockman <gdb@mit.edu> Mon, 18 Jan 2010 03:30:21 -0500
+
invirt-iptables (1) unstable; urgency=low
* Initial Release.
{
echo 1 > /proc/sys/net/ipv4/ip_forward
- for table in $(sed -ne 's/^*//p' $(run-parts --list "$RULES")); do
- iptables -t "$table" -F
- done
- cat $(run-parts --list "$RULES") | iptables-restore -n
+ list=$(run-parts --list "$RULES")
+
+ if [ ! -z "$list" ]; then
+ for table in $(sed -ne 's/^*//p' $list); do
+ iptables -t "$table" -F
+ done
+ cat $list | iptables-restore -n
+ fi
}
do_reload()