]> git.ipfire.org Git - network.git/commitdiff
Make dumping all firewall rules a bit faster.
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Oct 2012 16:04:21 +0000 (16:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Oct 2012 16:04:21 +0000 (16:04 +0000)
functions.iptables

index 56f6729b89720cc15d9b4967fde70640b0762ded..2a9f438946eda5809872fb852fe3a69ba4da2fb3 100644 (file)
@@ -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 ))