[Clfs-support] mktemp question
Ken Moffat
zarniwhoop at ntlworld.com
Sun Sep 14 17:17:49 PDT 2008
On Sun, Sep 14, 2008 at 04:18:54PM -0700, Michael A. Peters wrote:
>
> Following the instructions in the book, mktemp gets installed in /usr/bin
>
> A lot of (or at least some) scripts (IE log rotate scripts that go in
> /etc/logrotate.d/) assume it is installed in /bin and the only libraries
> it uses are in /lib64 (or /lib) so it could go in theory go in /bin.
>
> Is there a "standard" install location for that binary that one can
> generally expect, or is there not really a standard install location for
> mktemp?
AFAIK the LFS-family of books have always put it in /usr/bin.
Where did you get these scripts, from a distro ? Presumably, /bin
matches what they must be doing. [ googles ... ] Hmm, seems common
to rh/fedora-derived distros, and is possibly how debian now do it.
OTOH, gentoo _used_ to have /bin/mktemp but moved to /usr/bin/mktemp
when coreutils started providing it (google records some pain
because it caused a problem with their build dependencies), maybe
they moved back. Others seems to be using /usr/bin.
I've found at least one old gentoo ebuild that moves it to /bin for
"common scripts" (also moves basename, chroot, cut, dir, dirname, du,
env, expr, head, mkfifo, readlink, seq, sleep, sort, tail, touch, tr,
tty, vdir, wc, yes ) - I find that a little dispiriting, both the
idea that scripts use things like dir which I've always though was
much less useful than 'ls', and the idea that they either don't set
a sensible PATH, or that there are scripts which only "trust" what is
in /bin. Some of these might be for bootscripts, but those should be
distro-specific. We put a few of those into /bin for our own
bootscripts, on an as-needed basis (i.e. what _has_to_ run even if
/usr is not mounted).
I suppose the FHS would be the ultimate arbiter, but at the moment
I don't see any obvious reason why this would need to be in /bin.
ĸen
--
das eine Mal als Tragödie, das andere Mal als Farce
More information about the Clfs-support
mailing list