Avoid predictable filenames in /tmp.

Fri Nov 14 15:46:33 2003  Karl Eichwalder  <[EMAIL PROTECTED]>

        * contrib/htdig-3.2.0.spec (%post): Use 'mktemp'.

--- htdig-3.2.0b5/contrib/htdig-3.2.0.spec.~1~  2002-02-01 23:49:28.000000000 +0100
+++ htdig-3.2.0b5/contrib/htdig-3.2.0.spec      2003-11-14 15:46:06.000000000 +0100
@@ -54,10 +54,11 @@
        SERVERNAME="`grep '^ServerName' /etc/httpd/conf/httpd.conf | awk 'NR == 1 
{print $2}'`"
        [ -z "$SERVERNAME" ] && SERVERNAME="`hostname -f`"
        [ -z "$SERVERNAME" ] && SERVERNAME="localhost"
+        TMPFILE=$(mktemp /tmp/ht.XXXXXX) || exit 1
        sed 's/^start_url:.*/#&\
-# (See end of file for this parameter.)/' /etc/htdig/htdig.conf > /tmp/ht.$$
-       cat /tmp/ht.$$ > /etc/htdig/htdig.conf
-       rm /tmp/ht.$$
+# (See end of file for this parameter.)/' /etc/htdig/htdig.conf > $TMPFILE
+       cat $TMPFILE > /etc/htdig/htdig.conf
+       rm $TMPFILE
        cat >> /etc/htdig/htdig.conf <<!
 
 # Automatically set up by htdig RPM, from your current Apache httpd.conf...

Diff finished at Fri Nov 14 15:49:03


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
ht://Dig Developer mailing list:
[EMAIL PROTECTED]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to