Subject: bin/30407: lfs_cleanerd should be moved to /libexec
To: None <,>
From: None <>
List: netbsd-bugs
Date: 06/02/2005 19:29:00
>Number:         30407
>Category:       bin
>Synopsis:       lfs_cleanerd should be moved to /libexec
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 02 19:29:00 +0000 2005
>Originator:     Geert Hendrickx
>Release:        netbsd-2
NetBSD mantis 2.0_STABLE NetBSD 2.0_STABLE (MANTIS) #2: Thu Jun  2 16:01:02 CEST 2005  geert@mantis:/usr/obj/src/sys/arch/i386/compile/MANTIS i386

/usr/libexec/lfs_cleanerd is called when an LFS filesystem is mounted.  At boot-time, the various filesystems are mounted in the order they're listed in /etc/fstab.  My /tmp is LFS, and is listed before /usr.  Therefore I get a warning that lfs_cleanerd doesn't exist: it's on the /usr partition which isn't mounted yet.  
/dev/wd0f       /tmp    lfs     rw                      0       2
/dev/wd0g       /usr    ffs     rw,noatime,softdep      7       2
A workaround in this simple case is to list /tmp after /usr in /etc/fstab.  

The problem is worse when /usr itself is LFS.  Another workaround then, is to first mount /usr read-only, and then read-write.  A better solution is to move lfs_cleanerd to /libexec, since this MUST be on the / partition, which is always mounted read-only first.  This way, any filesystem, even /, can be LFS.