]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-checkconfig: fix colors when using dash
authorNatanael Copa <ncopa@alpinelinux.org>
Tue, 25 Dec 2012 15:50:54 +0000 (16:50 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 4 Jan 2013 14:57:22 +0000 (09:57 -0500)
The \e did not work as expected on dash. Replace with proper posix \033

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc-checkconfig.in

index 13dbf3bf6c354d5bf38f513ce28ba3d9120970bb..472755f6f4dc27b57c3ea20d88a5c6d143463f1b 100644 (file)
@@ -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