SVN: rc-scripts/trunk/lib/functions
glen
glen at pld-linux.org
Thu May 30 22:04:30 CEST 2013
Author: glen
Date: Thu May 30 22:04:30 2013
New Revision: 12674
Modified:
rc-scripts/trunk/lib/functions
Log:
add RC_BOOTTIME option to include uptime counter to all show messages
Modified: rc-scripts/trunk/lib/functions
==============================================================================
--- rc-scripts/trunk/lib/functions (original)
+++ rc-scripts/trunk/lib/functions Thu May 30 22:04:30 2013
@@ -392,12 +392,16 @@
# Some functions to handle PLD Linux-style messages
show() {
- local text len
+ local text len time
+
+ if is_yes "$RC_BOOTTIME"; then
+ time=$(awk '{printf("[%8.2f] ", $1)}' /proc/uptime)
+ fi
if is_no "$FASTRC" && is_yes "$GETTEXT"; then
- text=$(nls -n "$@")
+ text=$time$(nls -n "$@")
else
- text=$(printf "$@")
+ text=$time$(printf "$@")
fi
len=${#text}
while [ $((len++)) -lt $INIT_COL ]; do
More information about the pld-cvs-commit
mailing list