Subject: bin/22340: cleartmp should honor ifile on LFS
To: None <gnats-bugs@gnats.netbsd.org>
From: None <benedikt.meurer@unix-ag.uni-siegen.de>
List: netbsd-bugs
Date: 08/02/2003 14:35:21
>Number: 22340
>Category: bin
>Synopsis: cleartmp should honor ifile on LFS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 02 12:33:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Benedikt Meurer
>Release: NetBSD 1.6
>Organization:
University Siegen
>Environment:
System: NetBSD echobase.kosmos.all 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
/etc/rc.d/cleartmp does not honor ifile on LFS. It tries to delete it
and fails in the rm -rf stage and therefore do not executes the find
stage.
>How-To-Repeat:
create LFS partition, mount it on /tmp and run /etc/rc.d/cleartmp start
>Fix:
Apply the following patch:
--- /usr/src/etc/rc.d/cleartmp 2002-03-22 05:33:58.000000000 +0100
+++ /etc/rc.d/cleartmp 2003-08-02 14:21:41.000000000 +0200
@@ -19,12 +19,13 @@
echo "Clearing /tmp."
#
# Prune quickly with one rm, then use find to clean up
- # /tmp/[lq]* (this is not needed with mfs /tmp, but
+ # /tmp/[iq]* (this is not needed with mfs /tmp, but
# doesn't hurt anything).
#
- (cd /tmp && rm -rf [a-km-pr-zA-Z]* &&
+ (cd /tmp && rm -rf [a-hm-pr-zA-Z]* &&
find -x . ! -name . ! -name lost+found ! -name quota.user \
- ! -name quota.group -exec rm -rf -- {} \; -type d -prune)
+ ! -name quota.group ! -name ifile \
+ -exec rm -rf -- {} \; -type d -prune)
}
load_rc_config $name
>Release-Note:
>Audit-Trail:
>Unformatted: