Avoid two superflous calls to /bin/echo in Fancy output.
authorDidier Raboud <odyx@debian.org>
Mon, 23 Apr 2012 13:35:23 +0000 (15:35 +0200)
committerDidier Raboud <odyx@debian.org>
Mon, 23 Apr 2012 13:35:23 +0000 (15:35 +0200)
Signed-off-by: Didier Raboud <odyx@debian.org>
init-functions

index 8265984033e73bf2306e0de5cb0ffa57cf568643..6c897010998fa2057a2f12a57191717d5027d107 100644 (file)
@@ -415,15 +415,13 @@ log_end_msg_pre () {
 
         $TPUT sc
         $TPUT hpa 0
-        /bin/echo -n "["
         if [ $1 -eq 0 ]; then
-            /bin/echo -ne "${GREEN} ok "
+            /bin/echo -ne "[${GREEN} ok ${NORMAL}"
         elif [ $1 -eq 255 ]; then
-            /bin/echo -ne "${YELLOW}warn"
+            /bin/echo -ne "[${YELLOW}warn${NORMAL}"
         else
-            /bin/echo -ne "${RED}FAIL"
+            /bin/echo -ne "[${RED}FAIL${NORMAL}"
         fi
-        /bin/echo -ne "${NORMAL}]"
         $TPUT rc
     fi
 }