Author: glen
Date: Sun Sep 17 20:21:48 2006
New Revision: 7783

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
busy(), ok(), started(), are constant so their values can be cached.

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:21:48 2006
@@ -352,6 +352,11 @@
        echo -n "$out"
 }
 
+deltext()
+{
+       termput hpa $INIT_COL
+}
+
 # Displays message in square brackests ("[ DONE ]"). Takes two arguments.
 # First is the text to display, second is color number to use (argument to
 # tput setaf). If second argument is not given, default (2, green) will be
@@ -364,42 +369,38 @@
        echo -n "$(termput setaf $CBRACKETS)[$(termput setaf $COLOR) $(nls 
--nls-domain rc-scripts "$1") $(termput setaf $CBRACKETS)]$(termput op)"
 }
 
+_busy=$(progress "BUSY" "$CBUSY")
 busy()
 {
-       progress "BUSY" "$CBUSY"
+       echo -n "$_busy"
 }
 
+_ok=$(progress "DONE")
 ok()
 {
-       progress "DONE"
-       echo
+       echo "$_ok"
 }
 
+_started=$(progress "WORK")
 started()
 {
-       progress "WORK"
-       echo
+       echo "$_started"
 }
 
+_fail=$(progress "FAIL" "$CFAIL")
 fail()
 {
-       progress "FAIL" "$CFAIL"
-       echo
+       echo "$_fail"
        return 1
 }
 
+_died=$(progress "DIED" "$CFAIL")
 died()
 {
-       progress "DIED" "$CFAIL"
-       echo
+       echo "$_died"
        return 1
 }
 
-deltext()
-{
-       termput hpa $INIT_COL
-}
-
 # Check if $pid (could be plural) are running
 checkpid()
 {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to