Bruce Dubbs wrote:
> Thomas de Roo wrote:
>
>> OK, so I checked again. I issued
>>
>> cd /bin
>> ln -s dash sh
>>
>> and rebooted. A lot of the bootscripts fail, both LFS and BLFS, from
>> blfs-bootscripts-20120828 and lfs-bootscripts-20121013. So I suspect
>> /lib/services/init-functions. For the log, see
>> http://pastebin.com/k0b3RiD6.
>
> OK, I'll take a closer look.  A reboot should not be required though.
> Just running one of the scripts should duplicate the problem.  I can't
> look tonight, but I'll look tomorrow.

This impacts lfs too so I'm copying the lfs-dev list.

There are a couple of issues with dash and the lfs bootscripts.

First, dash does not like the construct:

local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`

That's easy enough to fix by removing local.  There are 5 instances of 
this, and the local part is not really required by the code logic.

The other issue is that dash has a built-in echo command that is 
different from both bash and /bin/echo.  The -e parameter is not 
recognized.  This doesn't stop the script but does result in an 
unintended "-e" being printed.

I tried specifying init-functions with /bin/bash, but that's ignored 
when the calling script is dash.

There are 21 places in the init-functions that use echo -e, so I suppose 
we could to prepend /bin/ to these echo commands, but is more overhead. 
  That overhead may be negligible though.

These scripts have been working since about September 2011 (16 months) 
and this is the first complaint.

I'm actually more inclined to put a note in BLFS that making sh -> dash 
breaks the bootscripts so don't do it.  Marking all bootscripts as 
/bin/bash is another option, but that leaves out potential non-LFS 
bootscripts.

Thoughts?

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to