Patchwork [6/6] openssh: add init.d/sshd status command for LSB compliance

login
register
mail settings
Submitter jackie huang
Date Aug. 22, 2013, 6:17 a.m.
Message ID <311185f8dbdd5b79419aa3aae313b0e54b1d30bf.1377151850.git.jackie.huang@windriver.com>
Download mbox | patch
Permalink /patch/56159/
State Accepted
Commit b9f0fc6e983f492533fd9321183666d61f474a58
Headers show

Comments

jackie huang - Aug. 22, 2013, 6:17 a.m.
From: Jackie Huang <jackie.huang@windriver.com>

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../openssh/openssh-6.2p2/init                     |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

Patch

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