Try temp file creation in a different location
... if the standard directory /tmp is not allowed to write to. As noted in #1273 this might be the case for Termux on Android.
This commit is contained in:
parent
6378371baa
commit
8518284795
|
@ -17194,7 +17194,12 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
maketempf() {
|
maketempf() {
|
||||||
TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX) || exit $ERR_FCREATE
|
TEMPDIR=$(mktemp -d /tmp/testssl.XXXXXX)
|
||||||
|
if [[ $? -ne 0 ]]; then
|
||||||
|
# for e.g. devices where we can't write to /tmp:
|
||||||
|
TEMPPATH=$PWD
|
||||||
|
TEMPDIR=$(mktemp -d $PWD/testssl.XXXXXX) || exit $ERR_FCREATE
|
||||||
|
fi
|
||||||
TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
|
TMPFILE=$TEMPDIR/tempfile.txt || exit $ERR_FCREATE
|
||||||
if [[ "$DEBUG" -eq 0 ]]; then
|
if [[ "$DEBUG" -eq 0 ]]; then
|
||||||
ERRFILE="/dev/null"
|
ERRFILE="/dev/null"
|
||||||
|
|
Loading…
Reference in New Issue