OCaml 4.14.0 rebuild
[arch-packages.git] / iptables / trunk / iptables-legacy-flush
blob3d8ee893f611c065611d2b7e77635d198fc82c0a
1 #!/bin/bash
3 # Usage: iptables-flush [6]
6 iptables=ip$1tables
7 if ! type -p "$iptables" &>/dev/null; then
8 echo "error: invalid argument"
9 exit 1
12 while read -r table; do
13 tables+=("/usr/share/iptables/empty-$table.rules")
14 done <"/proc/net/ip$1_tables_names"
16 if (( ${#tables[*]} )); then
17 cat "${tables[@]}" | "$iptables-restore"