[ofa-general] [PATCH] opensm/scripts/opensm.init.in: fix status command
Yevgeny Kliteynik
kliteyn at mellanox.co.il
Thu May 22 07:56:28 PDT 2008
Great, thanks.
-- Yevgeny
Sasha Khapyorsky wrote:
> 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() {
>
More information about the general
mailing list