From: Chris Lawrence Date: Mon, 4 Aug 2008 07:31:03 +0000 (-0500) Subject: lsb 3.2-18 Debian release. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~209 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fd7d5db1910c7e2c848b6e7cdfa012057003f61f;p=lsb.git lsb 3.2-18 Debian release. --- diff --git a/debian/changelog b/debian/changelog index 45e8042..d4d65d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +lsb (3.2-18) unstable; urgency=low + + * Also fix case where stdout isn't color-capable. (Closes: #493505, again) + + -- Chris Lawrence Mon, 04 Aug 2008 02:31:03 -0500 + lsb (3.2-17) unstable; urgency=low * log_{success,failure,warning}_msg suck, please don't use them for diff --git a/init-functions b/init-functions index d0fc183..5e4b4ae 100644 --- a/init-functions +++ b/init-functions @@ -301,22 +301,19 @@ log_end_msg () { RED=`$TPUT setaf 1` YELLOW=`$TPUT setaf 3` NORMAL=`$TPUT op` - if [ $1 -eq 0 ]; then - echo "." - elif [ $1 -eq 255 ]; then - /bin/echo -e " ${YELLOW}(warning).${NORMAL}" - retval=0 - else - /bin/echo -e " ${RED}failed!${NORMAL}" - fi else - if [ $1 -eq 0 ]; then - echo "." - elif [ $1 -eq 255 ]; then - echo -e " (warning)." - else - echo " failed!" - fi + RED='' + YELLOW='' + NORMAL='' + fi + + if [ $1 -eq 0 ]; then + echo "." + elif [ $1 -eq 255 ]; then + /bin/echo -e " ${YELLOW}(warning).${NORMAL}" + retval=0 + else + /bin/echo -e " ${RED}failed!${NORMAL}" fi log_end_msg_post "$@" return $retval diff --git a/test/lsb-test.sh b/test/lsb-test.sh new file mode 100644 index 0000000..663d133 --- /dev/null +++ b/test/lsb-test.sh @@ -0,0 +1,8 @@ +#!/bin/sh -e + +echo "Importing $1/init-functions" +. $1/init-functions + +log_warning_msg "Only a warning" + +echo "OK!"