Author: glen
Date: Sun Sep 17 20:14:08 2006
New Revision: 7781

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
Correct show() function printf handling.

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions      (original)
+++ rc-scripts/trunk/rc.d/init.d/functions      Sun Sep 17 20:14:08 2006
@@ -41,7 +41,7 @@
 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 @@
 # 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.
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to