Blame bootstrap_ver/iptables/tests/shell/testcases/firewalld-restore/0002-firewalld-restart_0
|
Packit Service |
fa126c |
#!/bin/sh
|
|
Packit Service |
fa126c |
|
|
Packit Service |
fa126c |
# simulate restart after it went down, so first restore
|
|
Packit Service |
fa126c |
# the complete ruleset
|
|
Packit Service |
fa126c |
|
|
Packit Service |
fa126c |
$XT_MULTI iptables-restore < $(dirname "$0")/dumps/ipt-save-completed.txt
|
|
Packit Service |
fa126c |
|
|
Packit Service |
fa126c |
# add dummy rules to see if they get cleared or not.
|
|
Packit Service |
fa126c |
for table in raw mangle nat filter;do
|
|
Packit Service |
fa126c |
$XT_MULTI iptables -t $table -N FOO$table || exit 1
|
|
Packit Service |
fa126c |
$XT_MULTI iptables -t $table -A OUTPUT -m comment --comment '"dummy rule in table $table OUTPUT"' || exit 1
|
|
Packit Service |
fa126c |
$XT_MULTI iptables -t $table -A FOO$table -m comment --comment '"dummy rule in table $table FOO$table"' || exit 1
|
|
Packit Service |
fa126c |
done
|
|
Packit Service |
fa126c |
|
|
Packit Service |
fa126c |
# then run the other test script so it finds already-existing ruleset.
|
|
Packit Service |
fa126c |
|
|
Packit Service |
fa126c |
exec $(dirname "$0")/0001-firewalld_0
|