Subject: misc/35544: daily cron job runs out of room in /tmp
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <paul@whooppee.com>
List: netbsd-bugs
Date: 02/03/2007 02:15:00
>Number: 35544
>Category: misc
>Synopsis: daily cron job runs out of room in /tmp
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Feb 03 02:15:00 +0000 2007
>Originator: Paul Goyette
>Release: NetBSD 4.99.9 2007-02-02
>Organization:
----------------------------------------------------------------------
| Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: |
| Network Engineer | FA29 0E3B 35AF E8AE 6651 | paul@whooppee.com |
| | 0786 F758 55DE 53BA 7731 | pgoyette@juniper.net |
----------------------------------------------------------------------
>Environment:
System: NetBSD quicky.whooppee.com 4.99.9 NetBSD 4.99.9 (Quicky-A8N5X) #7: Fri Feb 2 04:37:28 PST 2007 paul@quicky.whooppee.com:/usr/obj/objdir.amd64/sys/arch/amd64/compile/QUICKY amd64
Architecture: x86_64
Machine: amd64
>Description:
Daily cron job (/etc/daily) can sometimes run out of room on the /tmp
file system. A local change which has proven useful is to allow the
administrator to define $TMPDIR in root's crontab file, and have the
daily job use that value (of course, supplying a default value of /tmp
to retain current behavior if $TMPDIR is not defined).
--- daily 2006-12-18 06:59:52.000000000 -0800
+++ /etc/daily 2007-02-02 17:59:53.000000000 -0800
@@ -66,7 +66,7 @@
# find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
#fi
-DAILYDIR=`mktemp -d /tmp/_daily.XXXXXX` || exit 1
+DAILYDIR=`mktemp -d ${TMPDIR:="/tmp"}/_daily.XXXXXX` || exit 1
trap "/bin/rm -rf $DAILYDIR ; exit 0" EXIT INT QUIT
>How-To-Repeat:
>Fix:
--- daily 2006-12-18 06:59:52.000000000 -0800
+++ /etc/daily 2007-02-02 17:59:53.000000000 -0800
@@ -66,7 +66,7 @@
# find . ! -name . -mtime +7 -exec rm -f -- {} \; ; }
#fi
-DAILYDIR=`mktemp -d /tmp/_daily.XXXXXX` || exit 1
+DAILYDIR=`mktemp -d ${TMPDIR:="/tmp"}/_daily.XXXXXX` || exit 1
trap "/bin/rm -rf $DAILYDIR ; exit 0" EXIT INT QUIT