Pierre Labastie wrote:
On 10/10/2017 21:35, Thanos Baloukas wrote:
On 10/10/2017 07:29 μμ, Bruce Dubbs wrote:
Bruce Dubbs wrote:
Pierre Labastie wrote:


On 10/10/2017 13:55, Николай Сосницкий wrote:
10.10.2017, 14:42, "Pierre Labastie" <[email protected]>:
On 10/10/2017 13:11, Николай Сосницкий wrote:
  Hello everybody!
  I found little mistake in LFS book (both sysvinit and systemd):
  in Capter 6 section Coreutils the last command
  "mv -v /usr/bin/{head,sleep,nice,test,[} /bin"
  has wrong operand "[".
  This mistake is not present in 7.5 and early versions and
present in
  7.6 and later include current stable:

http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-8.1-NOCHUNKS.html#ch-system-coreutils




  P. S. Sorry for my english, please.
"[" is the name of an executable. It does the same thing as "test".
Note
that it is not used much, since "[" is built in the sh or bash shell.
But since we move "test", we move "[".

Hello, Pierre!
I'm sorry for this. I asked in #lfs-support IRC cannel and have advice
to post in this mailing list.

Don't be sorry Nickolay: this is exactly what lfs-support is for. Asking
questions! Actually, the text in the sentence above the command you cite
may be misleading, since it mention only "head", "sleep", and "nice". It
should also mention "test" and "["... Also, I doubt "[" is useful in
/bin,
since bash has it built in.

bash does include [ as an internal command, but I'm not sure if all other
shells do.  However testing dash and zsh indicate that they do.  I really
don't think /bin/[ is needed at all any more.  We can say the same thing
about /bin/test.

I suspect the only reason for these commands any more are for really old
scripts that may hard code the path for these commands.

Maybe ash needs them.  ash is used during installation/rescue of
debian. I
do not think that is a good choice any more.

A little more research...  busybox/ash does indeed need them.  I don't
think lfs needs them, but they come for 'free' with coreutils.

In regard to their utility on lfs, they are specified by POSIX also

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

so I think that lfs needs them as long as it follows this standard,
as is stated on

http://www.linuxfromscratch.org/lfs/view/development/prologue/standards.html



Hmm, I'd say that the question is whether they should be moved from
/usr/bin to /bin, not whether they should be on the system. Applications
in /bin are for early boot process before /usr is mounted when it is on a
separate partition. In LFS, even in early boot, sh/bash is used, and test
and [ are built in commands, so neither test nor [ are needed in /bin. But
they can be in /usr/bin, it does not hurt... Concerning POSIX, I am not
sure it is specified that test and [ should be commands independent on the
shell or can be built in. If the second, removing "test" and "[" would
still be conformant if bash is present...

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, 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.

  -- Bruce


--
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