* [PATCH 1/6] sysklogd: add init.d/syslog status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 6:15 ` [PATCH 2/6] at: add init.d/atd " jackie.huang
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/recipes-extended/sysklogd/files/sysklogd | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-extended/sysklogd/files/sysklogd b/meta/recipes-extended/sysklogd/files/sysklogd
index dcbc81e..258f882 100755
--- a/meta/recipes-extended/sysklogd/files/sysklogd
+++ b/meta/recipes-extended/sysklogd/files/sysklogd
@@ -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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 2/6] at: add init.d/atd status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
2013-08-21 6:15 ` [PATCH 1/6] sysklogd: add init.d/syslog status command for LSB compliance jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 6:15 ` [PATCH 3/6] dbus: add init.d/dbus-1 " jackie.huang
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/recipes-extended/at/files/S99at | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-extended/at/files/S99at b/meta/recipes-extended/at/files/S99at
index 386f8a4..d2ba34b 100644
--- a/meta/recipes-extended/at/files/S99at
+++ b/meta/recipes-extended/at/files/S99at
@@ -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
@@ -20,6 +23,11 @@ restart() {
start
}
+rh_status() {
+ # run checks to determine if the service is running or use generic status
+ status /usr/sbin/atd
+}
+
case "$1" in
start)
start
@@ -30,8 +38,11 @@ case "$1" in
restart|reload)
restart
;;
+ status)
+ rh_status
+ ;;
*)
- echo $"Usage: $0 {start|stop|restart}"
+ echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 3/6] dbus: add init.d/dbus-1 status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
2013-08-21 6:15 ` [PATCH 1/6] sysklogd: add init.d/syslog status command for LSB compliance jackie.huang
2013-08-21 6:15 ` [PATCH 2/6] at: add init.d/atd " jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 6:15 ` [PATCH 4/6] sysvinit: add init.d/bootlogd " jackie.huang
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
index 0351190..04025e6 100644
--- a/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
+++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
@@ -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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/6] sysvinit: add init.d/bootlogd status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
` (2 preceding siblings ...)
2013-08-21 6:15 ` [PATCH 3/6] dbus: add init.d/dbus-1 " jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 6:15 ` [PATCH 5/6] nfs-utils: add init.d/nfsserver " jackie.huang
2013-08-21 6:15 ` [PATCH 6/6] openssh: add init.d/sshd " jackie.huang
5 siblings, 0 replies; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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>
---
meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index f8f07a0..7b87827 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 5/6] nfs-utils: add init.d/nfsserver status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
` (3 preceding siblings ...)
2013-08-21 6:15 ` [PATCH 4/6] sysvinit: add init.d/bootlogd " jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 17:34 ` Saul Wold
2013-08-21 6:15 ` [PATCH 6/6] openssh: add init.d/sshd " jackie.huang
5 siblings, 1 reply; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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>
---
.../nfs-utils/nfs-utils/nfsserver | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index e460e26..5b4f199 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 5/6] nfs-utils: add init.d/nfsserver status command for LSB compliance
2013-08-21 6:15 ` [PATCH 5/6] nfs-utils: add init.d/nfsserver " jackie.huang
@ 2013-08-21 17:34 ` Saul Wold
2013-08-22 1:52 ` jhuang0
0 siblings, 1 reply; 11+ messages in thread
From: Saul Wold @ 2013-08-21 17:34 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
On 08/20/2013 11:15 PM, jackie.huang@windriver.com wrote:
> 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>
> ---
> .../nfs-utils/nfs-utils/nfsserver | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> index e460e26..5b4f199 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> @@ -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
>
Should there also be a usage update or addition?
Sau!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 5/6] nfs-utils: add init.d/nfsserver status command for LSB compliance
2013-08-21 17:34 ` Saul Wold
@ 2013-08-22 1:52 ` jhuang0
0 siblings, 0 replies; 11+ messages in thread
From: jhuang0 @ 2013-08-22 1:52 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On 8/22/2013 1:34 AM, Saul Wold wrote:
> On 08/20/2013 11:15 PM, jackie.huang@windriver.com wrote:
>> 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>
>> ---
>> .../nfs-utils/nfs-utils/nfsserver | 9 +++++++++
>> 1 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> index e460e26..5b4f199 100644
>> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> @@ -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
>>
> Should there also be a usage update or addition?
There was not a usage line existed, that's why the original patch didn't
have a usage update, I will add it anyway.
Thanks,
Jackie
>
> Sau!
>
>
--
Jackie Huang
WIND RIVER | China Development Center
MSN:jackielily@hotmail.com
Tel: +86 8477 8594
Mobile: +86 138 1027 4745
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-21 6:15 [PATCH 0/6 v2] Add status command for daemon of some packages jackie.huang
` (4 preceding siblings ...)
2013-08-21 6:15 ` [PATCH 5/6] nfs-utils: add init.d/nfsserver " jackie.huang
@ 2013-08-21 6:15 ` jackie.huang
2013-08-21 17:34 ` Saul Wold
5 siblings, 1 reply; 11+ messages in thread
From: jackie.huang @ 2013-08-21 6:15 UTC (permalink / raw)
To: openembedded-core
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 | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
index 12fb79b..72c5822 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
@@ -54,6 +57,11 @@ check_keys() {
fi
}
+rh_status() {
+ status /usr/sbin/sshd
+ return $?
+}
+
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
@@ -92,8 +100,12 @@ case "$1" in
echo "."
;;
+ status)
+ rh_status
+ ;;
+
*)
- 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
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 6/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-21 6:15 ` [PATCH 6/6] openssh: add init.d/sshd " jackie.huang
@ 2013-08-21 17:34 ` Saul Wold
2013-08-22 5:53 ` jhuang0
0 siblings, 1 reply; 11+ messages in thread
From: Saul Wold @ 2013-08-21 17:34 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
On 08/20/2013 11:15 PM, jackie.huang@windriver.com wrote:
> 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 | 14 +++++++++++++-
> 1 files changed, 13 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
> index 12fb79b..72c5822 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
> @@ -54,6 +57,11 @@ check_keys() {
> fi
> }
>
> +rh_status() {
> + status /usr/sbin/sshd
> + return $?
> +}
> +
> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>
> case "$1" in
> @@ -92,8 +100,12 @@ case "$1" in
> echo "."
> ;;
>
> + status)
> + rh_status
Why rh_status here and in the "at" script? Can't you just do the status
/usr/bin/sshd directly here?
> + ;;
> +
> *)
> - 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
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 6/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-21 17:34 ` Saul Wold
@ 2013-08-22 5:53 ` jhuang0
0 siblings, 0 replies; 11+ messages in thread
From: jhuang0 @ 2013-08-22 5:53 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On 8/22/2013 1:34 AM, Saul Wold wrote:
> On 08/20/2013 11:15 PM, jackie.huang@windriver.com wrote:
>> 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 | 14
>> +++++++++++++-
>> 1 files changed, 13 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>> b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>> index 12fb79b..72c5822 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
>> @@ -54,6 +57,11 @@ check_keys() {
>> fi
>> }
>>
>> +rh_status() {
>> + status /usr/sbin/sshd
>> + return $?
>> +}
>> +
>> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>>
>> case "$1" in
>> @@ -92,8 +100,12 @@ case "$1" in
>> echo "."
>> ;;
>>
>> + status)
>> + rh_status
>
> Why rh_status here and in the "at" script? Can't you just do the status
> /usr/bin/sshd directly here?
We may found this from Red Hat/Fedora, sure we can do it directly here,
I will change it if you think it would be better.
Thanks,
Jackie
>
>> + ;;
>> +
>> *)
>> - 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
>>
>>
>
--
Jackie Huang
WIND RIVER | China Development Center
MSN:jackielily@hotmail.com
Tel: +86 8477 8594
Mobile: +86 138 1027 4745
^ permalink raw reply [flat|nested] 11+ messages in thread