[RFC] using mountpoint for mountkernfs/mountfs
matthew at linuxfromscratch.org
Wed Jan 5 14:15:03 PST 2005
Nathan Coulson wrote:
> there is a new binary called mountpoint that I would love to use for
> the lfs-bootscripts in mountkernfs.
> I have not yet determined if it requires /proc to be mounted to work,
> but I believe it would be cleaner then checking arbritary files in the
> respected directories.
OK, just to clear up some concerns about using 'mountproc'. Firstly it,
like 'pidof', is installed into /bin by default. As these are the only
two binaries installed there (everything else goes to /usr/bin or
/sbin), I'd say it's quite alright to leave it there and make use of it
in our bootscripts (like we do 'pidof'). I think it's safe to assume
that the maintainer would have had it install in /usr/bin if it wasn't
meant or designed to be used in bootscripts.
Now, about the use of /proc. I've taken a cursory glance at the source
of src/mountpoint.c, and it would appear to just use stuff from
sys/stat.h which is a POSIX header. I don't think POSIX defines /proc
at all (I *think* it's a Linux only invention), so I think it's again
safe to assume that anything from stat.h won't utilise it.
More information about the lfs-dev