summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases/nft-f/0013defines_1
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases/nft-f/0013defines_1')
-rwxr-xr-xtests/shell/testcases/nft-f/0013defines_114
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/shell/testcases/nft-f/0013defines_1 b/tests/shell/testcases/nft-f/0013defines_1
index 05370034..b6d575c9 100755
--- a/tests/shell/testcases/nft-f/0013defines_1
+++ b/tests/shell/testcases/nft-f/0013defines_1
@@ -4,15 +4,7 @@
set -e
-tmpfile=$(mktemp)
-if [ ! -w $tmpfile ] ; then
- echo "Failed to create tmp file" >&2
- exit 0
-fi
-
-trap "rm -rf $tmpfile" EXIT # cleanup if aborted
-
-echo "
+RULESET="
define var2 = \$var1
define var1 = lo
@@ -20,6 +12,6 @@ table ip t {
chain c {
iif \$var2
}
-}" >> $tmpfile
+}"
-$NFT -f $tmpfile
+$NFT -f - <<< $RULESET