summaryrefslogtreecommitdiffstats
path: root/iptables/tests/shell/testcases/ipt-restore/0002-parameters_0
blob: d632cbc0d6b9a169b7062f4c18cb47e09d134621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

set -e

# make sure wait options are accepted

clean_tempfile()
{
	if [ -n "${tmpfile}" ]; then
		rm -f "${tmpfile}"
	fi
}

trap clean_tempfile EXIT

tmpfile=$(mktemp) || exit 1

$XT_MULTI iptables-save -f $tmpfile
$XT_MULTI iptables-restore $tmpfile
$XT_MULTI iptables-restore -w 5 $tmpfile