summaryrefslogtreecommitdiffstats
path: root/rc
diff options
context:
space:
mode:
authorLukc <lukc@upyum.com>2010-12-13 22:44:58 +0100
committerLukc <lukc@upyum.com>2010-12-13 22:44:58 +0100
commitab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d (patch)
tree47eb09d8f198afdda2e983c32c78eeaff5f377f0 /rc
parent260f18c15c796933b4e788817d01385ce560e420 (diff)
downloadbase-ab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d.tar.gz
base-ab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d.tar.bz2
base-ab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d.tar.xz
base-ab3f1aa8bfa38de4d5cd1e4c6c2c09d14d36200d.zip
Script `rc.multi` mis à jour.
- Les changements sont uniquement estéthiques, pour le moment.
Diffstat (limited to 'rc')
-rwxr-xr-xrc/rc.multi23
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