Add status command for daemon of some packages
v3 cover Add status command for daemon of some packages
From: Jackie Huang <[email protected]>
v3 comments:
Add usage info for nfsserver, and drop rh_status in "at" and "sshd" script.
--
The following changes since commit d98f08a7ad95d0b17846276b028a6614f16b6846:
genext2fs: fix memory corruption on powerpc (2013-08-20 07:11:44 -0700)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib jhuang0/r_status_for_daemons_0822_0
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/r_status_for_daemons_0822_0
Jackie Huang (6):
sysklogd: add init.d/syslog status command for LSB compliance
nfs-utils: add init.d/nfsserver status command for LSB compliance
dbus: add init.d/dbus-1 status command for LSB compliance
sysvinit: add init.d/bootlogd status command for LSB compliance
at: add init.d/atd status command for LSB compliance
openssh: add init.d/sshd status command for LSB compliance
.../nfs-utils/nfs-utils/nfsserver | 11 +++++++++++ .../openssh/openssh-6.2p2/init | 10 +++++++++- meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | 9 ++++++++- meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 9 ++++++++- meta/recipes-extended/at/files/S99at | 8 +++++++- meta/recipes-extended/sysklogd/files/sysklogd | 13 ++++++++++++- 6 files changed, 55 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.4.1
PATCH v3 1/6 sysklogd: add init.d/syslog status command for LSB compliance
From: Jackie Huang <[email protected]>
--- meta/recipes-extended/sysklogd/files/sysklogd | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
meta/recipes-extended/sysklogd/files/sysklogd +12 -1
@@ -12,6 +12,9 @@ # Short-Description: System logger ### END INIT INFO +# Source function library. +. /etc/init.d/functions + PATH=/bin:/usr/bin:/sbin:/usr/sbin pidfile_syslogd=/var/run/syslogd.pid
@@ -132,8 +135,16 @@ case "$1" in $0 start fi ;; + status) + status syslogd + RETVAL=$? + status klogd + rval=$? + [ $RETVAL -eq 0 ] && exit $rval + exit $RETVAL + ;; *) - log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart}" + log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart|status}" exit 1 esac
Signature · 1 line
1.7.4.1
PATCH v3 2/6 nfs-utils: add init.d/nfsserver status command for LSB compliance
In reply to [email protected]From: Jackie Huang <[email protected]>
--- .../nfs-utils/nfs-utils/nfsserver | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +11 -0
@@ -14,6 +14,8 @@ # # Startup script for nfs-utils # +# Source function library. +. /etc/init.d/functions # # The environment variable NFS_SERVERS may be set in /etc/default/nfsd # Other control variables may be overridden here too
@@ -141,6 +143,13 @@ stop) exportfs -ua stop_statd stop_mountd stop_nfsd;; +status) + status /usr/sbin/rpc.mountd + RETVAL=$? + status nfsd + rval=$? + [ $RETVAL -eq 0 ] && exit $rval + exit $RETVAL;; reload) test -r /etc/exports && exportfs -r;; restart)exportfs -ua stop_mountd
@@ -150,4 +159,6 @@ restart)exportfs -ua start_mountd start_statd test -r /etc/exports && exportfs -a;; +*) echo "Usage: $0 {start|stop|status|reload|restart}" + exit 1;; esac
Signature · 1 line
1.7.4.1
PATCH v3 3/6 dbus: add init.d/dbus-1 status command for LSB compliance
In reply to [email protected]From: Jackie Huang <[email protected]>
--- meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init +8 -1
@@ -16,6 +16,9 @@ set -e +# Source function library. +. /etc/init.d/functions + DAEMON=@bindir@/dbus-daemon NAME=dbus DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
@@ -99,6 +102,10 @@ case "$1" in stop) shut_it_down ;; + status) + status $DAEMON + exit $? + ;; reload|force-reload) reload_it ;;
@@ -108,7 +115,7 @@ case "$1" in start_it_up ;; *) - echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2 exit 1 ;; esac
Signature · 1 line
1.7.4.1
PATCH v3 4/6 sysvinit: add init.d/bootlogd status command for LSB compliance
In reply to [email protected]From: Jackie Huang <[email protected]>
--- meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-)
meta/recipes-core/sysvinit/sysvinit/bootlogd.init +8 -1
@@ -13,6 +13,9 @@ DAEMON=/sbin/bootlogd NAME=bootlogd DESC="Bootlog daemon" +# source function library +. /etc/init.d/functions + test -f $DAEMON || exit 0 [ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
@@ -73,10 +76,14 @@ case "$ACTION" in start-stop-daemon --start --quiet --exec $DAEMON echo "$NAME." ;; + status) + status $DAEMON + exit $? + ;; *) N=${0##*/} N=${N#[SK]??} - echo "Usage: $N {start|stop|restart|force-reload}" >&2 + echo "Usage: $N {start|stop|status|restart|force-reload}" >&2 exit 1 ;; esac
Signature · 1 line
1.7.4.1
PATCH v3 5/6 at: add init.d/atd status command for LSB compliance
In reply to [email protected]From: Jackie Huang <[email protected]>
--- meta/recipes-extended/at/files/S99at | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
meta/recipes-extended/at/files/S99at +7 -1
@@ -5,6 +5,9 @@ umask 077 +# Source function library. +. /etc/init.d/functions + start() { echo -n "Starting atd: " start-stop-daemon --start --quiet --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
@@ -30,8 +33,11 @@ case "$1" in restart|reload) restart ;; + status) + status /usr/sbin/atd + ;; *) - echo $"Usage: $0 {start|stop|restart}" + echo $"Usage: $0 {start|stop|restart|status}" exit 1 esac
Signature · 1 line
1.7.4.1
PATCH v3 6/6 openssh: add init.d/sshd status command for LSB compliance
In reply to [email protected]From: Jackie Huang <[email protected]>
--- .../openssh/openssh-6.2p2/init | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-)
meta/recipes-connectivity/openssh/openssh-6.2p2/init +9 -1
@@ -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
Signature · 1 line
1.7.4.1