From: Michael Tremer Date: Wed, 3 Oct 2012 16:04:21 +0000 (+0000) Subject: Make dumping all firewall rules a bit faster. X-Git-Tag: 005~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed26fecff77573dc6e618b80701b95f6f04123dc;p=network.git Make dumping all firewall rules a bit faster. --- diff --git a/functions.iptables b/functions.iptables index 56f6729b..2a9f4389 100644 --- a/functions.iptables +++ b/functions.iptables @@ -303,8 +303,8 @@ function iptables_dump() { log ${log_facility} "Firewall ruleset for IPv${proto}:" counter=1 - while read line; do - line=$(print "%4d | %s" "${counter}" "${line}") + while read -r line; do + printf -v line "%4d | %s" "${counter}" "${line}" log ${log_facility} "${line}" counter=$(( $counter + 1 ))