On 11/05/2011 04:15 PM, Bruce Dubbs wrote:
> DJ Lucas wrote:
>> Mostly for Bruce, but sent to list for everyone's review:
>>
>> Attached are some fixes for the bootscripts. These are mostly cosmetic,
>> but there are some minor functional changes due in part to reverting to
>> multi-part writes to the screen, some clean-up/simplification of syntax,
>> for instance, == instead of = in comparison tests, use "-a" and "-o"
>> instead of "]&&  [" or "] || [" resp., removed the second interactive
>> prompt, made available boot message prefixes and color ${INFO} for
>> mountvirtfs, made certain that control charcters are not written to the
>> boot log in case color codes are used in screen messages, and reduced
>> duplication of items in rc.site and init-functions (rc.site is required
>> for init-functions/rc). Please review, and discuss if necessary, before
>> commit.
> I appreciate the fixes.  I'll review the diff in more detail, but note
> that I used = instead of == for string comparisons explicitly because
> the bash man page says:
>
> string1 == string2
>         True if the strings are equal.  = may be used in place of == for
>         strict POSIX compliance.
>
> I was trying to make the scripts Bourne/Posix compatible.
>
>     -- Bruce
>
Although I hadn't actually noticed that init-functions used /bin/sh for 
the interpreter prior to your mention POSIX above, I fortunately only 
made the comparison and logical and/or changes in the rc script which 
uses /bin/bash for the schebang (it looks as if this is the only script 
to do this as well). The goal was consistency. You are correct, a single 
"=" character must be used for comparison tests in init-functions for 
POSIX compliance. I'll drop in a couple of random scripts using dash or 
ash as the interpreter tonight or tomorrow to make sure, but I believe 
all is well. It could be argued, however, that we should drop to /bin/sh 
for the interpreter used in the rc script and do the reverse. If agreed, 
just respond here and ignore the earlier patch (I'm pretty sure we 
should probably use sh syntax and avoid mixing the two for consistency). 
I'll reverse those specific changes and get a corrected one tested 
tomorrow or later tonight along with the proposed cosmetic changes. I'm 
going to build ash and symlink to /bin/sh now to get a thorough test 
done. I'll get to dash later in the week.

-- DJ Lucas


-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

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

Reply via email to