[ofa-general] [PATCH] opensm/scripts/opensm.init.in: fix status command

Sasha Khapyorsky sashak at voltaire.com
Thu May 22 07:48:10 PDT 2008


This script is installed in SuSE systems where 'status' command/shell
function doesn't exist (bug#982
https://bugs.openfabrics.org/show_bug.cgi?id=982).

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 opensm/scripts/opensm.init.in |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/opensm/scripts/opensm.init.in b/opensm/scripts/opensm.init.in
index da23b36..a573662 100644
--- a/opensm/scripts/opensm.init.in
+++ b/opensm/scripts/opensm.init.in
@@ -81,7 +81,13 @@ stop () {
 }
 
 Xstatus () {
-    status opensm
+	pid="`pidof opensm`"
+	ret=$?
+	if [ $ret -eq 0 ] ; then
+		echo "OpenSM is running... pid=$pid"
+	else
+		echo "OpenSM is not running."
+	fi
 }
 
 restart() {
-- 
1.5.4.rc2.60.gb2e62




More information about the general mailing list