On 01/22/2013 02:18 PM, Thomas de Roo wrote: > On 01/22/13 18:32, Bruce Dubbs wrote: >> 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 > I would like a warning in the book instead of the current remark - so if > I want to link sh to dash, I know I can expect a challenge ;) "Don't do > it" is a but too harsh, I think. Figuring out how to implement this > deviation from the book (your distro, your rules) is what LFS is about! > > Groet, > Thomas
why not leaving the shell as bash and then using dash for your shell as a user if you want to use dash? Just need to set the shell in /etc/passwd to dash. That way the system boots fine and the "user" gets dash if they want. -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
