Prevent extra newlines in elog for einfo invocations. See bug #136208.
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Jun 2006 23:22:05 +0000 (23:22 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Jun 2006 23:22:05 +0000 (23:22 -0000)
svn path=/main/trunk/; revision=3501

bin/isolated-functions.sh

index be054d4eee118f948c59b5ac75a525c15b6e8edf..0bb4fa6d52a588f4088ef6935a96ab46ca84dd3a 100644 (file)
@@ -49,7 +49,7 @@ esyslog() {
 }
 
 einfo() {
-       einfon "$*\n"
+       einfon "$*"
        LAST_E_CMD="einfo"
        return 0
 }
@@ -57,7 +57,11 @@ einfo() {
 einfon() {
        elog_base INFO "$*"
        [[ ${RC_ENDCOL} != "yes" && ${LAST_E_CMD} == "ebegin" ]] && echo
-       echo -ne " ${GOOD}*${NORMAL} $*"
+       if [ "${FUNCNAME[1]}" == "einfo" ]; then
+               echo -e " ${GOOD}*${NORMAL} $*"
+       else
+               echo -ne " ${GOOD}*${NORMAL} $*"
+       fi
        LAST_E_CMD="einfon"
        return 0
 }