# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
-# $Id: functions,v 1.26 1999/09/15 21:20:36 wiget Exp $
+# $Id: functions,v 1.27 1999/09/27 09:56:25 misiek Exp $
#
# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
# Hacked by: Greg Galloway and Marc Ewing
:
elif [ ! -d /usr/share/terminfo ] || \
! ( [ -x /usr/bin/tput ] || [ -x /bin/tput ] ) ; then
- if [ "$2" == "1" ]; then echo -ne "\033[0;31m"
- elif [ "$2" == "2" ]; then echo -ne "\033[0;32m"
- elif [ "$2" == "5" ]; then echo -ne "\033[0;35m"
- elif [ "$2" == "6" ]; then echo -ne "\033[0;36m"
- elif [ "$2" == "7" ]; then echo -ne "\033[0;37m"
+ echo -ne "\033[0;3${2}m"
fi
else
- tput $@
+ tput "$@"
fi
}
fi
text="`TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="$NLS_DOMAIN" "$1"`"
shift
- printf_ "$text" $@
+ printf_ "$text" "$@"
echo
else
echo "$@"
fi
fi
fi
+ ps h $pid >/dev/null 2>&1 && (deltext; fail) || (deltext; ok)
+ else
+ deltext; died
fi
- ps h $pid >/dev/null 2>&1 && (deltext; fail) || (deltext; ok)
# use specified level only
else
if ps h $pid >/dev/null 2>&1; then
fi
else
deltext
- fail
+ died
fi
# Remove pid file if any.