On 11/17/2018 11:00 PM, Bruce Dubbs via blfs-dev wrote:
On 11/17/2018 08:34 PM, DJ Lucas via blfs-dev wrote:
Sorry for multiple messages, moving to LFS-Dev.
All of the ones that we have separate should be moved into the section
above. /bin/sleep is used in init-functions (as well as /bin/head and
/bin/nice). As to touch, I'm kind of indifferent (but see below).
We've done it before, but it would be a loaner. We do use the touch
builtin in rc, and could can change that to /bin/touch and just
sidestep the issue completely and lump it in with the others.
Thoughts?
The only files that need to be moved to support the scripts are those in
S00mountvirtfs S08localnet S20swap S40mountfs
S05modules S10udev S30checkfs
Nope. My assessment was almost correct. You forgot init-functions and
the rc script that ties them all together where all four of these are
required. /bin/head is used explicitly, but the others use PATH. Bash
does not provide a nice built-in (nor head, sleep, or touch built-ins).
I moved the binaries out of the way and disabled hashing to test (see
below). I could have sworn that bash did provide nice, but turns out it
only sets nice level via command or job. /usr/bin/touch should be moved
as well for SysV (and all four tucked away in the earlier command block
for FHS compliance with the extra command block and text removed) and
init-functions and rc should probably have explicit paths supplied to be
absolutely correct. FYI /bin/sleep is used in killproc(), /bin/head is
used in pidofproc(), /bin/touch is used in the rc script to set
fastboot, and /bin/nice is used in start_daemon().
That still doesn't fix the broken systemd test, but it works around it
in LFS because the SysV book needs touch to be where systemd happens to
expect it to be.
After those, /usr is mounted (or should be). I've tested using a
separate /usr partition and have not run into any issues. Anything that
systemd wants and is not available should be fixed in systemd.
IIRC, systemd doesn't even support a separate /usr partition so
specifying /usr/bin should always work when using systemd.
It didn't some years ago, but we have -Dsplit-usr=true. Most of the
distros do have a merged /usr, so it doesn't get much testing, but it
has remained mostly compatible so far. /lib/systemd/system vs
/usr/lib/systemd/system was a sore spot for a short time, but was bent
to be compliant. There was also was some issue for udev as well at one
time, but, if memory serves, this was corrected in evdev and eventually
made its way back to systemd. To be honest, though, I haven't built a
network mounted /usr in many years, or even NFS in some time for that
matter.
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ set +h
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /usr/bin/touch{,-bak}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ touch blah
-bash: touch: command not found
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /usr/bin/touch{-bak,}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/head{,-bak}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ head blah
-bash: head: command not found
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/head{-bak,}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/sleep{,-bak}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sleep 1
-bash: sleep: command not found
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/sleep{-bak,}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/nice{,-bak}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ nice --help
-bash: nice: command not found
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$ sudo mv /bin/nice{-bak,}
dj [ ~/LFS/LFS/trunk/BOOK/bootscripts ]$
--DJ
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page