[lxc-devel] [PATCH] lxc-checkconfig: fix colors when using dash

Stéphane Graber stgraber at ubuntu.com
Tue Dec 25 16:24:34 UTC 2012


On 12/25/2012 04:50 PM, Natanael Copa wrote:
> The \e did not work as expected on dash. Replace with proper posix \033
> 
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

Pushed to staging. Thanks.


> ---
>  src/lxc/lxc-checkconfig.in | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/lxc/lxc-checkconfig.in b/src/lxc/lxc-checkconfig.in
> index 13dbf3b..472755f 100644
> --- a/src/lxc/lxc-checkconfig.in
> +++ b/src/lxc/lxc-checkconfig.in
> @@ -4,10 +4,10 @@
>  : ${CONFIG:=/proc/config.gz}
>  : ${GREP:=zgrep}
>  
> -SETCOLOR_SUCCESS="printf \\e[1;32m"
> -SETCOLOR_FAILURE="printf \\e[1;31m"
> -SETCOLOR_WARNING="printf \\e[1;33m"
> -SETCOLOR_NORMAL="printf \\e[0;39m"
> +SETCOLOR_SUCCESS="printf \\033[1;32m"
> +SETCOLOR_FAILURE="printf \\033[1;31m"
> +SETCOLOR_WARNING="printf \\033[1;33m"
> +SETCOLOR_NORMAL="printf \\033[0;39m"
>  
>  is_set() {
>      $GREP -q "$1=[y|m]" $CONFIG
> 


-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20121225/45f71f4d/attachment.pgp>


More information about the lxc-devel mailing list