From d378eb3033ea0969fa2389f5e58f9a62fc583c82 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 18 Nov 2017 00:23:41 -0200 Subject: [PATCH 1/2] wifish: fix mktemp with busybox --- wifish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifish b/wifish index fdc0317..b7e756d 100755 --- a/wifish +++ b/wifish @@ -73,7 +73,7 @@ scan_results() { # {{{ # Scans for APs or shows scanned results. Writes to $stem echo " * Scanning For APs ..." >&2 # Get the data - stemp=$(mktemp /tmp/$$.XXXX.menu) + stemp=$(mktemp /tmp/$$.menu.XXXXXX) trap 'rm -f $stemp' INT TERM EXIT if [ -n "$_IN_TEST" ];then # {{{ # Test/Mock mode cat data/wscan.txt > $stemp # }}} From 22f66ca10e0b3ee7f4120d5e3f8aad2437fdc694 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 18 Nov 2017 00:23:55 -0200 Subject: [PATCH 2/2] test/test.sh: fix mktemp with busybox --- test/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.sh b/test/test.sh index de170cd..1cdac77 100755 --- a/test/test.sh +++ b/test/test.sh @@ -31,8 +31,8 @@ if [ $? -eq 0 ];then add_err "wifish should fail with WIFISH_DEFAULT as 'foo'" fi -tfile=$(mktemp /tmp/$$.XXX.parsed) -efile=$(mktemp /tmp/$$.XXX.parsed.err) +tfile=$(mktemp /tmp/$$.parsed.XXXXXX) +efile=$(mktemp /tmp/$$.parsed.err.XXXXXX) trap 'rm -f $tfile' INT TERM EXIT trap 'rm -f $efile' INT TERM EXIT WIFISH_DEFAULT=list AWK_LOCATION=./awk _IN_TEST=true ./wifish >$tfile 2>$efile