[PATCH 5/9] CTS: make the status command more accurate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




Signed-off-by: Angus Salkeld <asalkeld@xxxxxxxxxx>
---
 cts/corosync.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cts/corosync.py b/cts/corosync.py
index b91843a..9ab9fe3 100644
--- a/cts/corosync.py
+++ b/cts/corosync.py
@@ -262,7 +262,8 @@ class corosync_needle(ClusterManager):
         out = str(lines)
 
         if 'systemctl' in out:
-                ret= (string.find(out, 'inactive (dead)') == -1)
+            is_running = ('active (running)' in out)
+            ret = (rc is 0 and is_running is 0)
         else:
             is_stopped = string.find(out, 'stopped')
             is_dead = string.find(out, 'dead')
-- 
1.7.7.5

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Corosync Project]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux