DJ Lucas wrote: > On 09/05/2011 07:48 PM, Bruce Dubbs wrote: >> DJ Lucas wrote:
>>> Get rid of boot_mesg all together. This was left over from a mixed >>> results attempt at international messages and long display output >>> (and line wrapping). As James mentioned the other day, it has long >>> since been abandoned by all of us involved with adding it. Both the >>> echo binary and the bash built-in support the -e flag. We can choose >>> /bin/bash for the schebang in the scripts, or just use /bin/echo. The >>> built-in is faster, but we can guarantee that /bin/echo has the >>> needed functionality if the /bin/sh symlink is changed. Personally, I >>> prefer the /bin/bash schebang, but really no technical argument >>> either way. >> I prefer /bin/bash too, but left everything as /bin/sh (and used >> non-bash constructs). I think there may be a problem if a non-LFS >> script uses /bin/sh and the functions use /bin/bash. >> >> I agree that we can guarantee echo -e works and let the shell decide to >> use a builtin or /bin/echo. > Get rid of echo_*() and friends and just use print_*_msg() in these > cases. Handle boot logging in the print_*_msg() functions as per the LSB > spec (framework is already there if the LSB functions are copied directly). Cutting this down to a single issue for a more focused discussion. We can discuss other issues in separate posts. I'm not sure how to translate boot_mesg into echo_*() and friends. For example, let's take checkfs. The LSB version has: if [ -f /fastboot ]; then echo "${INFO}/fastboot found!" log_success_msg "Will not perform file system checks as requested." exit 0 fi This doesn't support logging. I suppose this could be changed to something like: MESSAGE="${INFO}/fastboot found!\n" log_success_msg "${MESSAGE} Will not perform file system checks as requested." We can still use the new wait_for_user() lfs function where needed. I note that the current log_*_msg() functions don't yet use the MESSAGE variable. I did add log_skipped_msg(), primarily for network use, but perhaps we need a log_info_msg() too. If we do that, I don't think we need to use a MESSAGE variable. I don't see MESSAGE as a part of the LSB spec. Comments? -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page