Skip to contentSkip to conversation

openssh: fix sshd status command error prompt

PATCH New Qiang Chen 1 participant 1 message Oct 18, 2013

lore
Share & tools
lore

Qiang Chen

author
#0 lore raw

PATCH 1/1 openssh: fix sshd status command error prompt

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.

---
 .../openssh/openssh-6.2p2/init                     |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/openssh/openssh-6.2p2/init +1 -1
index 266689c..e7f3971 100644
@@ -97,7 +97,7 @@ case "$1" in
 
   status)
 	status /usr/sbin/sshd
-	return $?
+	exit $?
   ;;
 
   *)
Signature · 1 line
1.7.9.5