From 38a4f52169c7f0bff3b9c071f297da3f788ccb63 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 28 Oct 2005 17:59:37 +0000 Subject: [PATCH] colorize/colpanic(): reset attributes after giving out the message git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2197 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/scripts/functions | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util-vserver/scripts/functions b/util-vserver/scripts/functions index 4b8e4c8..4a24bd5 100644 --- a/util-vserver/scripts/functions +++ b/util-vserver/scripts/functions @@ -203,14 +203,21 @@ function colorize esac fi - "$@" + ( "$@" ) echo -ne "\e[m" fi } function colpanic { - colorize error panic "$@" + if test -n "$_VS_ERRFILE"; then + echo "$@" >>"$_VS_ERRFILE" + else + colorize echo -n "$@" >&2 + fi + echo + + exit 1 } function colwarning -- 1.8.1.5