blob: 4c1ac41db3b471c925ee2b38b958bb7456088f1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/bash
RULESET="flush ruleset
add table x
add chain x y
add rule x y accept comment rule1
add rule x y accept comment rule4
add rule x y index 0 accept comment rule2
insert rule x y index 2 accept comment rule3"
$NFT -f - <<< "$RULESET" && \
$NFT -f - <<< "$RULESET" && \
echo "$RULESET" | tr '\n' ';' | $NFT -i >/dev/null && \
exit 0
echo "E: intra-transaction rule reference failed"
exit 1
|