Fixed init script.
authorFlorian Pose <fp@igh-essen.com>
Tue, 14 Aug 2007 14:00:07 +0000
changeset 702 bc985819713a
parent 701 aac472ccd54c
child 703 daaa2e8ae232
Fixed init script.
script/init.d/ethercat
--- a/script/init.d/ethercat	Fri Aug 10 15:04:39 2007 +0000
+++ b/script/init.d/ethercat	Tue Aug 14 14:00:07 2007 +0000
@@ -103,6 +103,7 @@
 {
     if [ -r /etc/rc.status ]; then
         rc_failed
+        rc_status -v
         rc_exit
     else
         echo " failed"
@@ -112,6 +113,20 @@
 
 #------------------------------------------------------------------------------
 
+function exit_dead()
+{
+    if [ -r /etc/rc.status ]; then
+        rc_failed
+        rc_status -v
+        rc_exit
+    else
+        echo " dead"
+        exit 1
+    fi
+}
+
+#------------------------------------------------------------------------------
+
 function parse_mac_address()
 {
     if [ -z "${1}" ]; then
@@ -241,7 +256,7 @@
     if [ ${MASTERS_RUNNING} -eq 0 -a ${MASTERS_IDLE} -eq 0 ]; then
         exit_running
     else
-        exit_fail
+        exit_dead
     fi
     ;;