Jeremy Huntwork wrote:
> On 2/4/12 8:04 PM, Bruce Dubbs wrote:
>> If you know of any issues it the current scripts, let me know.
> 
> Off the top of my head, the use of 'echo -e' and 'echo -n' is not 
> handled the same in every shell. Switching those to printf "...\n" and 
> printf "..." respectively is more universal.
> 
> In my scripts, there were also a couple of instances of the function 
> keyword used when it is more portable without it - not sure if you have 
> any of those in your current scripts.

OK, here is what I found:

rc.site uses $() in two places.  I don't think that's portable.

console uses: echo -en and the function keyword

rc uses $() and echo -e and the function keyword.  It also explicitly 
declares the shell as /bin/bash

init-functions uses echo -e and/or -n in about 21 places.

cleanfs uses the function keyword

ifdown (but not ifup) explicitly declares /bin/bash

To be honest, I'm not sure I want to restrict the scripts to a 
lowest-common api that was written 45 years ago.  There are a few places 
where we could be more consistent though.

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

Reply via email to