From 502e2c334dd4d5ffd4e31ffbfcf7169589062a83 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Mon, 19 Aug 2013 05:10:32 -0400 Subject: [PATCH] openssh: add init.d/sshd status command for LSB compliance (From OE-Core rev: d1e518b6942b945be7a4d44bc137a1441af8f837) Signed-off-by: Li Wang Signed-off-by: Jackie Huang Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-connectivity/openssh/openssh-6.2p2/init | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init index 12fb79b..266689c 100644 --- a/meta/recipes-connectivity/openssh/openssh-6.2p2/init +++ b/meta/recipes-connectivity/openssh/openssh-6.2p2/init @@ -1,6 +1,9 @@ #! /bin/sh set -e +# source function library +. /etc/init.d/functions + # /etc/init.d/ssh: start and stop the OpenBSD "secure shell" daemon test -x /usr/sbin/sshd || exit 0 @@ -92,8 +95,13 @@ case "$1" in echo "." ;; + status) + status /usr/sbin/sshd + return $? + ;; + *) - echo "Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart}" + echo "Usage: /etc/init.d/ssh {start|stop|status|reload|force-reload|restart}" exit 1 esac -- 2.7.4