aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2006-12-17 12:53:22 +0000
committerThomas Bächler <thomas@archlinux.org>2006-12-17 12:53:22 +0000
commit4b00503d2d25e40b0e962df08005d749cf3a4c87 (patch)
tree5e6f4577f33e8bd5070a7f1031abd9e4e73a03b2 /functions
parent779bd2abb1b67431b6e353eaba569779fb718833 (diff)
downloadinitscripts-4b00503d2d25e40b0e962df08005d749cf3a4c87.tar.xz
added stat_append to functions, fixed fsck bugs when clock is not set
Diffstat (limited to 'functions')
-rw-r--r--functions10
1 files changed, 10 insertions, 0 deletions
diff --git a/functions b/functions
index 0ae7b62..a43d3a2 100644
--- a/functions
+++ b/functions
@@ -24,6 +24,9 @@ if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
C_CLEAR="\033[1;0m"
fi
+SAVE_POSITION="\033[s"
+RESTORE_POSITION="\033[u"
+
# prefixes:
PREFIX_REG="::"
@@ -51,10 +54,17 @@ stat_bkgd() {
stat_busy() {
echo -ne "$C_OTHER$PREFIX_REG $C_MAIN$1$C_CLEAR "
+ echo -ne "${SAVE_POSITION}"
deltext
echo -ne " $C_OTHER[${C_BUSY}BUSY$C_OTHER]$C_CLEAR "
}
+stat_append() {
+ echo -ne "${RESTORE_POSITION}"
+ echo -ne "$C_MAIN$1$C_CLEAR"
+ echo -ne "${SAVE_POSITION}"
+}
+
stat_done() {
deltext
echo -e " $C_OTHER[${C_DONE}DONE$C_OTHER]$C_CLEAR "