Use "mktemp -d -t xxx" to create the temporary directories. This will use trunk
authormartti <martti@NetBSD.org>
Wed, 06 Jun 2007 13:30:47 +0000
branchtrunk
changeset 159489 2529aec9aa9c
parent 159488 dd2583edad9f
child 159490 9d34eb7f773a
Use "mktemp -d -t xxx" to create the temporary directories. This will use TMPDIR environment variable if set, otherwise use /tmp. (misc/35544)
etc/daily
etc/monthly
etc/security
etc/weekly
--- a/etc/daily	Wed Jun 06 13:21:28 2007 +0000
+++ b/etc/daily	Wed Jun 06 13:30:47 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: daily,v 1.69 2006/12/17 23:24:09 hubertf Exp $
+#	$NetBSD: daily,v 1.70 2007/06/06 13:30:47 martti Exp $
 #	@(#)daily	8.2 (Berkeley) 1/25/94
 #
 
@@ -66,7 +66,7 @@
 #	find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
 #fi
 
-DAILYDIR=`mktemp -d /tmp/_daily.XXXXXX` || exit 1
+DAILYDIR=$(mktemp -d -t _daily) || exit 1
 
 trap "/bin/rm -rf $DAILYDIR ; exit 0" EXIT INT QUIT
 
--- a/etc/monthly	Wed Jun 06 13:21:28 2007 +0000
+++ b/etc/monthly	Wed Jun 06 13:30:47 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: monthly,v 1.10 2004/04/09 17:35:21 kim Exp $
+#	$NetBSD: monthly,v 1.11 2007/06/06 13:30:47 martti Exp $
 #	from: @(#)monthly	8.1 (Berkeley) 6/9/93
 #
 
@@ -19,7 +19,7 @@
 echo "Subject: $host monthly output for $date"
 echo ""
 
-MONTHLYDIR=`mktemp -d /tmp/_monthly.XXXXXX` || exit 1
+MONTHLYDIR=$(mktemp -d -t _monthly) || exit 1
 
 trap "/bin/rm -rf $MONTHLYDIR ; exit 0" EXIT INT QUIT PIPE
 
--- a/etc/security	Wed Jun 06 13:21:28 2007 +0000
+++ b/etc/security	Wed Jun 06 13:30:47 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: security,v 1.101 2007/03/27 08:37:58 jnemeth Exp $
+#	$NetBSD: security,v 1.102 2007/06/06 13:30:48 martti Exp $
 #	from: @(#)security	8.1 (Berkeley) 6/9/93
 #
 
@@ -40,7 +40,7 @@
 	mkdir -p "$work_dir"
 fi
 
-SECUREDIR=`mktemp -d /tmp/_securedir.XXXXXX` || exit 1
+SECUREDIR=$(mktemp -d -t _securedir) || exit 1
 
 trap "/bin/rm -rf $SECUREDIR ; exit 0" EXIT INT QUIT PIPE
 
--- a/etc/weekly	Wed Jun 06 13:21:28 2007 +0000
+++ b/etc/weekly	Wed Jun 06 13:30:47 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: weekly,v 1.22 2007/02/15 23:04:10 reed Exp $
+#	$NetBSD: weekly,v 1.23 2007/06/06 13:30:48 martti Exp $
 #	from: @(#)weekly	8.2 (Berkeley) 1/2/94
 #
 
@@ -26,7 +26,7 @@
 	exit 1;
 fi
 
-WEEKLYDIR=`mktemp -d /tmp/_weekly.XXXXXX` || exit 1
+WEEKLYDIR=$(mktemp -d -t _weekly) || exit 1
 
 trap "/bin/rm -rf $WEEKLYDIR ; exit 0" EXIT INT QUIT PIPE
 
@@ -50,7 +50,7 @@
 #	echo ""
 #	echo "Looking for checked out files:"
 #
-#	TDIR=`mktemp -d /tmp/_checkout.XXXXXX` || exit 1
+#	TDIR=$(mktemp -d -t _checkout) || exit 1
 #	trap "/bin/rm -rf $TDIR ; exit 0" EXIT INT QUIT
 #	for file in `find -f /usr/src ! -fstype local -prune -or \
 #	    -name 'p.*' -print | egrep 'SCCS/p\.'`; do