Make bootscripts more POSIX compliant

Dan Nicholson dbn.lists at gmail.com
Thu Feb 22 13:59:38 PST 2007


On 2/22/07, Matthew Burgess <matthew at linuxfromscratch.org> wrote:
> On Thursday 22 February 2007 19:05, Dan Nicholson wrote:
>
> > The problem with using printf is that POSIX doesn't say that it needs
> > to be a builtin (although it is in dash) and the coreutils executable
> > is in /usr/bin.
>
> Well, I think that POSIX does state that printf should be a builtin.  There
> are codes that appear in a utility's Synopsis section, which determine
> whether it is optional or mandatory.  Compare, for example, the
> specifications of 'admin' and 'alias' to those of 'echo' and 'printf'. (I
> don't want to paste links as free registration is preferred by The Open
> Group).

After having a conversation with Matthew off-list, it was decided that
there is no mandated list of built-ins by POSIX. I was able to check
the source for posh, and printf is not a built-in there. Therefore, to
reliably use printf, we'd have to move the coreutils utility to /bin.
So, I'm just going to commit the $ECHO stuff for now. We can always
open up the printf conversation again.

--
Dan



More information about the lfs-dev mailing list