From ab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d Mon Sep 17 00:00:00 2001 From: Lukc Date: Mon, 13 Dec 2010 22:44:58 +0100 Subject: Script `rc.multi` mis à jour. - Les changements sont uniquement estéthiques, pour le moment. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rc/rc.multi | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/rc/rc.multi b/rc/rc.multi index 465332f..cd30bc5 100755 --- a/rc/rc.multi +++ b/rc/rc.multi @@ -11,16 +11,29 @@ if [ -x /etc/rc.fix ]; then /etc/rc.fix fi +echo_err () { + echo -n -e "\033[00;31m\033[66G!$1!\033[00m" + echo -e "\033[72G\033[00;01;31m[ERROR]\033[00m" +} +echo_ok () { + echo -e "\033[75G\033[00;01;32m[OK]\033[00m" +} + + # Start services if [ "$SYSLOG" -o "${SERVICES[*]}" ]; then - echo -n "starting services:" + echo -e "\033[00;01m > Starting services:\033[00m" if [ -f /etc/rc.d/$SYSLOG -a -x /etc/rc.d/$SYSLOG ]; then - echo -n " $SYSLOG" - /etc/rc.d/$SYSLOG start &> /dev/null || echo -n "[ERROR]" + echo -e -n "\033[00m $SYSLOG" + /etc/rc.d/$SYSLOG start &> /dev/null || echo_err fi for service in ${SERVICES[@]}; do - echo -n " $service" - /etc/rc.d/$service start &> /tmp/rc.$$ || echo -n "[ERROR]" + echo -e -n "\033[00m > $service" + if /etc/rc.d/$service start &> /tmp/rc.$$; then + echo_ok + else + echo_err $? + fi /usr/bin/logger -t $service -f /tmp/rc.$$ /bin/rm -f /tmp/rc.$$ done -- cgit v1.2.3-54-g00ecf