Make bootscripts more POSIX compliant

Bruce Dubbs bruce.dubbs at
Mon Feb 19 23:01:50 PST 2007

Dan Nicholson wrote:

> First patch is to eliminated "echo -[en]" since it's not always
> supported by POSIX shells. I chose to use printf since it was a
> builtin in dash. I didn't notice until later that it's not mentioned
> in POSIX. And the executable printf is in /usr/bin. We can maintain
> the same "echo -[en]" syntax by switching in /bin/echo everywhere,
> too.

I prefer using /bin/echo.  I wonder if there would be a test to see if
echo -[en] works or not and then:

if (works) ECHO=echo
else ECHO=/bin/echo

and then use $ECHO everywhere.

  -- Bruce

More information about the lfs-dev mailing list