diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2013-01-24 21:45:18 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2013-01-24 21:45:18 +0000 |
commit | 53ea84b7e5ff24e53bb4e187a8c514f4cf2edf11 (patch) | |
tree | 33c5a6e83755559d4b9802d7be06e05c1a0050a1 /bootscripts | |
parent | dd5d8670cfead65f50d9b013e6d25d5bfe9f8921 (diff) |
Remove bashisms from init-functions file in the boot scripts.
Upgrade to e2fsprogs-1.42.7.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10103 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'bootscripts')
-rw-r--r-- | bootscripts/ChangeLog | 6 | ||||
-rw-r--r-- | bootscripts/lfs/lib/services/init-functions | 52 |
2 files changed, 32 insertions, 26 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index bc64c304a..627b1630f 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,9 @@ +2013-01-24 Bruce Dubbs <bdubbs@linuxfromscratch.org> + * Remove local attribue of some variables for Bourne + shell compatability + * Specify /bin/echo in commands with -e switch for + Bourne shell compatability + 2012-10-13 Bruce Dubbs <bdubbs@linuxfromscratch.org> * Remove unneeded sleep in killproc * Add option for verbose fsck diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 29ff26270..f6be0dccb 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -522,18 +522,18 @@ statusproc() base="${1##*/}" if [ -n "${pidlist}" ]; then - echo -e "${INFO}${base} is running with Process" \ + /bin/echo -e "${INFO}${base} is running with Process" \ "ID(s) ${pidlist}.${NORMAL}" else if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then - echo -e "${WARNING}${1} is not running but" \ + /bin/echo -e "${WARNING}${1} is not running but" \ "/var/run/${base}.pid exists.${NORMAL}" else if [ -n "${pidfile}" -a -e "${pidfile}" ]; then - echo -e "${WARNING}${1} is not running" \ + /bin/echo -e "${WARNING}${1} is not running" \ "but ${pidfile} exists.${NORMAL}" else - echo -e "${INFO}${1} is not running.${NORMAL}" + /bin/echo -e "${INFO}${1} is not running.${NORMAL}" fi fi fi @@ -566,22 +566,22 @@ timespec() ################################################################################ log_success_msg() { - echo -n -e "${BMPREFIX}${@}" - echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" # Strip non-printable characters from log file - local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` timespec - echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG} + /bin/echo -e "${STAMP} ${logmessage} OK" >> ${BOOTLOG} return 0 } log_success_msg2() { - echo -n -e "${BMPREFIX}${@}" - echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}" echo " OK" >> ${BOOTLOG} @@ -601,22 +601,22 @@ log_success_msg2() ################################################################################ log_failure_msg() { - echo -n -e "${BMPREFIX}${@}" - echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" # Strip non-printable characters from log file timespec - local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` - echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG} + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -e "${STAMP} ${logmessage} FAIL" >> ${BOOTLOG} return 0 } log_failure_msg2() { - echo -n -e "${BMPREFIX}${@}" - echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}" echo "FAIL" >> ${BOOTLOG} @@ -634,13 +634,13 @@ log_failure_msg2() ################################################################################ log_warning_msg() { - echo -n -e "${BMPREFIX}${@}" - echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}" + /bin/echo -n -e "${BMPREFIX}${@}" + /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}" # Strip non-printable characters from log file - local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` timespec - echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG} + /bin/echo -e "${STAMP} ${logmessage} WARN" >> ${BOOTLOG} return 0 } @@ -656,23 +656,23 @@ log_warning_msg() ################################################################################ log_info_msg() { - echo -n -e "${BMPREFIX}${@}" + /bin/echo -n -e "${BMPREFIX}${@}" # Strip non-printable characters from log file - local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` timespec - echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG} + /bin/echo -n -e "${STAMP} ${logmessage}" >> ${BOOTLOG} return 0 } log_info_msg2() { - echo -n -e "${@}" + /bin/echo -n -e "${@}" # Strip non-printable characters from log file - local logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` - echo -n -e "${logmessage}" >> ${BOOTLOG} + logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'` + /bin/echo -n -e "${logmessage}" >> ${BOOTLOG} return 0 } |