diff options
Diffstat (limited to 'rc')
-rwxr-xr-x | rc/rc.multi | 23 |
1 files 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 |