Subject: Re: Use of /tmp in /etc/{daily,weekly,monthly,security}
To: None <martti.kuparinen@iki.fi>
From: Takahiro Kambe <taca@back-street.net>
List: tech-userlevel
Date: 06/05/2007 15:23:07
In message <Pine.NEB.4.64.0706050910580.17699@p130.piuha.net>
	on Tue, 5 Jun 2007 09:12:18 +0300 (EEST),
	Martti Kuparinen <martti.kuparinen@iki.fi> wrote:
> Inspired by misc/35544, any objections if I commit this?
Basically, I agree.

> Index: daily
> ===================================================================
> RCS file: /cvsroot/src/etc/daily,v
> retrieving revision 1.69
> diff -u -r1.69 daily
> --- daily	17 Dec 2006 23:24:09 -0000	1.69
> +++ daily	5 Jun 2007 06:09:04 -0000
> @@ -38,8 +38,8 @@
>   #
>   #echo ""
>   #echo "Removing scratch and junk files:"
> -#if [ -d /tmp -a ! -h /tmp ]; then
> -#	cd /tmp && {
> +#if [ -d ${TMPDIR:="/tmp"} -a ! -h ${TMPDIR:="/tmp"} ]; then
> +#	cd ${TMPDIR:="/tmp"} && {
Though this is comment-outed part, I think that this change assumes
TMPDIR is defined for all processes.  If setting TMPDIR in
/etc/daily.conf only, "/tmp" still used other processes and need to be
cleaned.

Of course, it is about minor details.  :-)

-- 
Takahiro Kambe <taca@back-street.net>