]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Correct show() function printf handling.
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 17 Sep 2006 18:14:08 +0000 (18:14 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 17 Sep 2006 18:14:08 +0000 (18:14 +0000)
svn-id: @7781

rc.d/init.d/functions

index 62f2918bdecb8004f4d92d63c3460a7434955b13..3550fd389738e770475d877390b158d46a087625 100644 (file)
@@ -41,7 +41,7 @@ CPOWEREDBY="$CYAN"    # "Powered by" color
 CPLD="$GREEN"          # "PLD Linux Distribution" color
 CI="$RED"              # Capital I color (press I to enter interactive startup)
 CRESMAN="$GREEN"       # "Resource Manager" color
-CHARS=""               # Characters displayed on the begining of show line
+CHARS=""               # Characters displayed on the beginning of show line
 CCHARS="$NORMAL"       # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example)
 
 # Source configuration if available - may override default values
@@ -330,22 +330,23 @@ msg_usage()
 # Some functions to handle PLD Linux-style messages
 show()
 {
-       typeset text
-       text="$@"
+       typeset out
 
-       if is_no "$FASTRC" && is_yes "$GETTEXT"; then
-               text=$(nls "$text")
-       fi
+               echo -n "$INIT_DOTS"
+               termput hpa 0
+               if [ -n "$CHARS" ]; then
+                       termput setaf $CCHARS
+                       echo -n "$CHARS"
+                       termput op
+               fi
 
-       echo -n "$INIT_DOTS"
-       termput hpa 0
-       if [ -n "$CHARS" ]; then
-               termput setaf $CCHARS
-               echo -n "$CHARS"
-               termput op
-       fi
-       printf "$@"
-       termput hpa $INIT_COL
+               if is_no "$FASTRC" && is_yes "$GETTEXT"; then
+                       nls -n "$@"
+               else
+                       printf "$@"
+               fi
+
+               termput hpa $INIT_COL
 }
 
 # Displays message in square brackests ("[ DONE ]"). Takes two arguments.
This page took 0.033696 seconds and 4 git commands to generate.