openssh: fix sshd status command error prompt
authorQiang Chen <qiang.chen@windriver.com>
Fri, 18 Oct 2013 08:50:20 +0000 (16:50 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 18 Oct 2013 14:58:16 +0000 (15:58 +0100)
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.

(From OE-Core rev: e7cf83ec3f39a7c41e38c6030b0d903fa7d37b2a)

Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-connectivity/openssh/openssh-6.2p2/init

index 266689c..e7f3971 100644 (file)
@@ -97,7 +97,7 @@ case "$1" in
 
   status)
        status /usr/sbin/sshd
-       return $?
+       exit $?
   ;;
 
   *)