X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lib%2Ffunctions;h=69041da25b6dac6cb40f697b10dd28484052ae18;hb=003ec37db641afcc22cd662bbc7969af80ec83a0;hp=bbdbd64cfea3a8716080d2b8fe44e16692f206d7;hpb=12e7a5b1a4ca9c8f03ee66db198426770cc84300;p=rc-scripts.git diff --git a/lib/functions b/lib/functions index bbdbd64..69041da 100644 --- a/lib/functions +++ b/lib/functions @@ -10,6 +10,8 @@ # Arkadiusz Miśkiewicz # Michał Kochanowicz # Łukasz Pawelczyk +# Modified for TLD Linux by: +# Marcin Krol # First set up a default search path. export PATH="/sbin:/usr/sbin:/bin:/usr/bin" @@ -47,7 +49,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 +60,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 +408,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 +457,7 @@ busy() { } ok() { - echo -ne "$_ok${RC_FEDORA+\\r}${RC_FEDORA-\\n}" + echo "$_ok" } started() { @@ -474,7 +465,7 @@ started() { } fail() { - echo -ne "$_fail${RC_FEDORA+\\r}${RC_FEDORA-\\n}" + echo "$_fail" return 1 } @@ -588,7 +579,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 @@ -1332,35 +1323,6 @@ rc_gettext_init() { fi } -use_upstart () { - return 1 -} -emit () { - return 0 -} -is_upstart_task() { - return 1 -} -is_upstart_running() { - return 1 -} -upstart_start() { - return 1 -} -upstart_stop() { - return 1 -} -upstart_reload() { - return 0 -} -upstart_status() { - return 1 -} -_upstart_controlled() { - return 0 -} -alias upstart_controlled='_upstart_controlled $0 "$@"' - rc_gettext_init rc_cache_init