X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=blobdiff_plain;f=lib%2Ffunctions;h=6d68d96a22c6c6aa69cf751d28946617b73fba1e;hp=bbdbd64cfea3a8716080d2b8fe44e16692f206d7;hb=a50fdc3af84c5a9f83fd4593dc7cdc7efa3a68ef;hpb=12e7a5b1a4ca9c8f03ee66db198426770cc84300 diff --git a/lib/functions b/lib/functions index bbdbd64..6d68d96 100644 --- a/lib/functions +++ b/lib/functions @@ -5,7 +5,7 @@ # # Author: Miquel van Smoorenburg, # Hacked by: Greg Galloway and Marc Ewing -# Modified for PLD Linux by: +# Modified for TLD Linux by: # Marek Obuchowicz # Arkadiusz Miśkiewicz # Michał Kochanowicz @@ -47,7 +47,7 @@ CDONE="$GREEN" # DONE and WORK color CBUSY="$MAGENTA" # BUSY color CFAIL="$RED" # FAIL and DIED color CPOWEREDBY="$CYAN" # "Powered by" color -CPLD="$GREEN" # "PLD Linux Distribution" color +CTLD="$GREEN" # "TLD Linux" color CI="$RED" # Capital I color (press I to enter interactive startup) CRESMAN="$GREEN" # "Resource Manager" color CHARS="" # Characters displayed on the beginning of show line @@ -58,17 +58,6 @@ CCHARS="$NORMAL" # Color of these characters (look at /etc/sysconfig/init-colors [ -r /etc/sysconfig/system ] && . /etc/sysconfig/system [ -r /etc/sysconfig/bootsplash ] && . /etc/sysconfig/bootsplash -# if initscript is invoked via bash, enable RedHat/Fedora compatibility -# RC_FEDORA is "set" if enabled and "unset" when not, but it's "value" is always empty -# this is useful for inline constructs -if [ "${BASH_VERSION+set}" = "set" ]; then - RC_LOGGING=yes - FASTRC=no - RC_FEDORA= -else - unset RC_FEDORA || : -fi - if [ -z "$VSERVER" -o "$VSERVER" = "detect" ]; then { while read _f _ctx; do @@ -417,7 +406,7 @@ msg_usage() { nls "Usage: %s" "$*" } -# Some functions to handle PLD Linux-style messages +# Some functions to handle TLD Linux-style messages show() { local text len time @@ -466,7 +455,7 @@ busy() { } ok() { - echo -ne "$_ok${RC_FEDORA+\\r}${RC_FEDORA-\\n}" + echo "$_ok" } started() { @@ -474,7 +463,7 @@ started() { } fail() { - echo -ne "$_fail${RC_FEDORA+\\r}${RC_FEDORA-\\n}" + echo "$_fail" return 1 } @@ -588,7 +577,7 @@ run_cmd() { cd / export HOME=/tmp TMPDIR=/tmp if is_no "$RC_LOGGING"; then - ${user:+setuidgid -s $user} "$@" 2>&1 + ${user:+setuidgid -s $user} eval "$@" 2>&1 else ${user:+setuidgid -s $user} initlog -c "$*" 2>&1 fi