From f6cb2453c0ac198edd5773d3a0c677fb4ec6f539 Mon Sep 17 00:00:00 2001 From: Dirk Froemberg Date: Mon, 16 Apr 2001 11:50:14 +0000 Subject: Use /usr/bin/mktemp to generate temporary file. Taken from: ports/net/netsaint-plugins/scripts/configure 8-) --- www/mod_php3/scripts/configure.php | 10 ++++++---- www/mod_php4/scripts/configure.php | 10 ++++++---- www/mod_php5/scripts/configure.php | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) (limited to 'www') diff --git a/www/mod_php3/scripts/configure.php b/www/mod_php3/scripts/configure.php index b09c72ded1d5..5e7cad763a09 100644 --- a/www/mod_php3/scripts/configure.php +++ b/www/mod_php3/scripts/configure.php @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then exit fi +tempfile=`/usr/bin/mktemp -t checklist` + if [ "${BATCH}" ]; then set \"zlib\" \"MySQL\" else @@ -32,14 +34,14 @@ gettext "gettext library support" OFF \ YP "YP/NIS support" OFF \ sysvsem "System V semaphore support" OFF \ sysvshm "System V shared memory support" OFF \ -2> /tmp/checklist.tmp.$$ +2> $tempfile retval=$? - if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` + if [ -s $tempfile ]; then + set `cat $tempfile` fi - rm -f /tmp/checklist.tmp.$$ + rm -f $tempfile case $retval in 0) if [ -z "$*" ]; then diff --git a/www/mod_php4/scripts/configure.php b/www/mod_php4/scripts/configure.php index a5d1ef18bf77..fa48d59f9730 100644 --- a/www/mod_php4/scripts/configure.php +++ b/www/mod_php4/scripts/configure.php @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then exit fi +tempfile=`/usr/bin/mktemp -t checklist` + if [ "${BATCH}" ]; then set \"zlib\" \"MySQL\" else @@ -39,14 +41,14 @@ sockets "sockets support" OFF \ sysvsem "System V semaphore support" OFF \ sysvshm "System V shared memory support" OFF \ transsid "Transparent session id" OFF \ -2> /tmp/checklist.tmp.$$ +2> $tempfile retval=$? - if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` + if [ -s $tempfile ]; then + set `cat $tempfile` fi - rm -f /tmp/checklist.tmp.$$ + rm -f $tempfile case $retval in 0) if [ -z "$*" ]; then diff --git a/www/mod_php5/scripts/configure.php b/www/mod_php5/scripts/configure.php index a5d1ef18bf77..fa48d59f9730 100644 --- a/www/mod_php5/scripts/configure.php +++ b/www/mod_php5/scripts/configure.php @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then exit fi +tempfile=`/usr/bin/mktemp -t checklist` + if [ "${BATCH}" ]; then set \"zlib\" \"MySQL\" else @@ -39,14 +41,14 @@ sockets "sockets support" OFF \ sysvsem "System V semaphore support" OFF \ sysvshm "System V shared memory support" OFF \ transsid "Transparent session id" OFF \ -2> /tmp/checklist.tmp.$$ +2> $tempfile retval=$? - if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` + if [ -s $tempfile ]; then + set `cat $tempfile` fi - rm -f /tmp/checklist.tmp.$$ + rm -f $tempfile case $retval in 0) if [ -z "$*" ]; then -- cgit v1.2.3