From 81fff819d603ddffd44b735de9b6a9d0fd9d0592 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 18 Mar 2012 12:05:45 +0000 Subject: [PATCH] scstadmin: Make /etc/init.d/scst status work on RHEL 6.2. Apparently RHEL 6.2 doesn't define the function rc_status in /lib/lsb/init-functions. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4163 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/init.d/scst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scstadmin/init.d/scst b/scstadmin/init.d/scst index ac8d17d7e..0f04f38f0 100755 --- a/scstadmin/init.d/scst +++ b/scstadmin/init.d/scst @@ -79,9 +79,7 @@ cat <<"EOF" SCST_CFG=/etc/scst.conf -if [ ! -e /lib/lsb/init-functions ]; then - # Slackware and Gentoo. -rc_status() { +show_status() { _rc_status_ret=$? for i; do case "$i" in @@ -95,6 +93,9 @@ rc_status() { done return ${_rc_status_ret} } + +if [ ! -e /lib/lsb/init-functions ]; then + # Slackware and Gentoo. start_daemon() { "$@" >/dev/null 2>&1 & } @@ -332,7 +333,7 @@ case "$1" in ## Print the current status of the service. echo -n "SCST status: " scst_status >/dev/null 2>&1 - rc_status -v + show_status -v exit $? ;; *)