mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-22 01:53:54 +08:00
Fixed init script.
This commit is contained in:
+16
-1
@@ -103,6 +103,7 @@ function exit_fail()
|
||||
{
|
||||
if [ -r /etc/rc.status ]; then
|
||||
rc_failed
|
||||
rc_status -v
|
||||
rc_exit
|
||||
else
|
||||
echo " failed"
|
||||
@@ -112,6 +113,20 @@ function exit_fail()
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
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 @@ status)
|
||||
if [ ${MASTERS_RUNNING} -eq 0 -a ${MASTERS_IDLE} -eq 0 ]; then
|
||||
exit_running
|
||||
else
|
||||
exit_fail
|
||||
exit_dead
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user