Use CreateTempFile function for temporary files

This commit is contained in:
mboelen 2016-01-11 00:24:00 +01:00
parent 20dd3c50d7
commit d5867762c6
1 changed files with 4 additions and 8 deletions

View File

@ -36,14 +36,10 @@
/usr/local/etc/apache /usr/local/etc/apache2 /usr/local/etc/apache22 \ /usr/local/etc/apache /usr/local/etc/apache2 /usr/local/etc/apache22 \
/usr/pkg/etc/httpd /etc/sysconfig/apache2" /usr/pkg/etc/httpd /etc/sysconfig/apache2"
if [ "${OS}" = "AIX" ]; then CreateTempFile
RANDOMSTRING1=`echo lynis-$(od -N4 -tu /dev/random | awk 'NR==1 {print $2} {}')`; RANDOMSTRING2=`echo lynis2-$(od -N4 -tu /dev/random | awk 'NR==1 {print $2} {}')` TMPFILE="${TEMP_FILE}"
TMPFILE="/tmp/${RANDOMSTRING1}"; TMPFILE2="/tmp/${RANDOMSTRING2}" CreateTempFile
echo "" > ${TMPFILE}; echo "" > ${TMPFILE2} TMPFILE2="${TEMP_FILE}"
else
TMPFILE=`mktemp /tmp/lynis.XXXXXXXXXX` || exit 1
TMPFILE2=`mktemp /tmp/lynis2.XXXXXXXXXX` || exit 1
fi
# #
################################################################################# #################################################################################
# #