From e21ef1f72f8b9de109af9d62c003758f0c9e56fa Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Sun, 25 Mar 2007 12:51:14 +0000 Subject: [PATCH] * fixed etc/rc.d/functions.in to "move left" the proper number of chars (L-1 instead of L) to get the "art" correctly aligned git-svn-id: svn://svn.opensde.net/opensde/package/trunk@20577 10447126-35f2-4685-b0cf-6dd780d3921f --- base/sysfiles/etc_rc.d_functions.in.txt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/base/sysfiles/etc_rc.d_functions.in.txt b/base/sysfiles/etc_rc.d_functions.in.txt index 6dccd2531..ced36c389 100644 --- a/base/sysfiles/etc_rc.d_functions.in.txt +++ b/base/sysfiles/etc_rc.d_functions.in.txt @@ -16,8 +16,8 @@ # ECHO='echo -e' -ESC='\e' # 033 -BELL='\a' # 07 +ESC='\e' # \e or \033 +BELL='\a' # \a or 07 ART_SUCCESS=" OK " ART_FAILURE=" FAIL" @@ -31,9 +31,8 @@ COLOR_FAILURE="$ESC[31m" # red MOVE_EOL="$ESC[222G" # 222 columns to the right... kind-of-eol MOVE_UP="$ESC[1A" # 1 line up (eat last \n) -# ${#foo} works on bash, dash and pdksh, not on ash -MOVE_LEFT_STATUS="$ESC[${#ART_SUCCESS}D" # move left the length of $ART_SUCCESS -MOVE_LEFT_NEXT="$ESC[${#ART_NEXT}D" # move left the length of $ART_NEXT +MOVE_LEFT_STATUS="$ESC[$( expr ${#ART_SUCCESS} - 1 )D" # move left the length of $ART_SUCCESS +MOVE_LEFT_NEXT="$ESC[$( expr ${#ART_NEXT} - 1 )D" # move left the length of $ART_NEXT title() { local x=1 columns=