Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Qiang Chen <qiang.chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] openssh: fix sshd status command error prompt
Date: Fri, 18 Oct 2013 16:50:20 +0800	[thread overview]
Message-ID: <1382086221-19473-1-git-send-email-qiang.chen@windriver.com> (raw)

sshd status command results in error prompt:

root@qemu0:~# /etc/init.d/sshd status
/usr/sbin/sshd (pid 1199) is running...
/etc/init.d/sshd: line 100: return: can only `return' from a
function or sourced script

"service --status-all" command also display wrong status for sshd.

This commit fix this error prompt and make service command display
right status for sshd.

Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
---
 .../openssh/openssh-6.2p2/init                     |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
index 266689c..e7f3971 100644
--- a/meta/recipes-connectivity/openssh/openssh-6.2p2/init
+++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
@@ -97,7 +97,7 @@ case "$1" in
 
   status)
 	status /usr/sbin/sshd
-	return $?
+	exit $?
   ;;
 
   *)
-- 
1.7.9.5



                 reply	other threads:[~2013-10-18  8:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382086221-19473-1-git-send-email-qiang.chen@windriver.com \
    --to=qiang.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox