On 10/10/2017 03:31 PM, Bruce Dubbs wrote:
Pierre Labastie wrote:


But my point was just that the sentence above the "mv" command on the
coreutils page should mention "test" and "[" ;)

Since the lfs boot scripts assume /bin/sh is bash,

There is no assumption. rc uses #!/bin/bash explicitly. :-)

the mv command would
only be needed if both the /bin/sh command is really ash or some
equivalent primitive shell AND /usr is on a separate partition.  Either
of those has very low probability on an lfs based system.  Combined the
probability is quite negligible.

It would be better to just remove those from the mv command.  I'd wager
that most new LFS users don't even know that they exist.


Form the FHS-3.0 doc regarding /bin:
//The [ and test commands must be placed together in either /bin or /usr/bin.//

2016 (POSIX.1-2008 with Technical Corrigendums 1 and 2) describes the _utility_ (for lack of a shorter/better explanation, a program in $PATH):

//In the second form of the utility, where the utility name used is [ rather than test, the application shall ensure that the closing square bracket is a separate argument. The test and [ utilities may be implemented as a single linked utility which examines the basename of the zeroth command line argument to determine whether to behave as the test or [ variant. Applications using the exec() family of functions to execute these utilities shall ensure that the argument passed in arg0 or argv[0] is '[' when executing the [ utility and has a basename of "test" when executing the test utility.//

I'm honestly not sure if there are any bashisms in the bootscripts, but it doesn't matter as we use /bin/bash explicitly. I remember running with /bin/sh -> ash for several months, but that was probably prior to the LSB rewrite. From a strict compliance standpoint, there is no longer any justification for them in /bin, and they should probably be omitted from the command (unless there is something that hard-codes them someplace).

--DJ

--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to