* [PATCH 0/6] Add status command for LSB compliance for some packages
@ 2013-08-20 3:25 jackie.huang
2013-08-20 3:25 ` [PATCH 1/6] dbus: add init.d/dbus-1 status command for LSB compliance jackie.huang
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 UTC (permalink / raw)
To: openembedded-core
From: Jackie Huang <jackie.huang@windriver.com>
test info:
MACHINE ??= "qemux86-64"
IMAGE_INSTALL_append = " at sysklogd"
$ bitbake core-image-sato
root@qemux86-64:~# /etc/init.d/atd status
/usr/sbin/atd (pid 580) is running...
root@qemux86-64:~# /etc/init.d/syslog status
syslogd (pid 695) is running...
klogd (pid 697) is running...
root@qemux86-64:~# /etc/init.d/nfsserver status
/usr/sbin/rpc.mountd (pid 685) is running...
nfsd (pid 683 682 681 680 679 678 677 676) is running...
root@qemux86-64:~# /etc/init.d/bootlogd status
/sbin/bootlogd is stopped
root@qemux86-64:~# /etc/init.d/dbus-1 status
/usr/bin/dbus-daemon (pid 704 589) is running...
root@qemux86-64:~# /etc/init.d/sshd status
/usr/sbin/sshd (pid 627) is running...
--
The following changes since commit 57662d4f813d5795cac1529633db80a09efdb089:
meta-skeleton: Add busybox config fragment example (2013-08-13 23:03:44 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib jhuang0/r_status_for_daemons_0820_0
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jhuang0/r_status_for_daemons_0820_0
Jackie Huang (6):
dbus: add init.d/dbus-1 status command for LSB compliance
sysvinit: add init.d/bootlogd status command for LSB compliance
nfs-utils: add init.d/nfsserver status command for LSB compliance
openssh: add init.d/sshd status command for LSB compliance
sysklogd: add init.d/syslog status command for LSB compliance
at: add init.d/atd status command for LSB compliance
.../nfs-utils/nfs-utils/nfsserver | 25 ++++++++++++++++-
.../openssh/openssh-6.2p2/init | 15 ++++++++++-
meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | 9 +++++-
meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 28 +++++++++++++++++---
meta/recipes-extended/at/files/S99at | 13 ++++++++-
meta/recipes-extended/sysklogd/files/sysklogd | 13 ++++++++-
6 files changed, 93 insertions(+), 10 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/6] dbus: add init.d/dbus-1 status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
2013-08-20 3:25 ` [PATCH 2/6] sysvinit: add init.d/bootlogd " jackie.huang
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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] 13+ messages in thread
* [PATCH 2/6] sysvinit: add init.d/bootlogd status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
2013-08-20 3:25 ` [PATCH 1/6] dbus: add init.d/dbus-1 status command for LSB compliance jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
2013-08-20 6:39 ` Phil Blundell
2013-08-20 3:25 ` [PATCH 3/6] nfs-utils: add init.d/nfsserver " jackie.huang
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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 | 28 ++++++++++++++++++---
1 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index f8f07a0..455d001 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
@@ -37,6 +40,19 @@ case "$0" in
;;
esac
+# default /var/log/boot is not an option since /var/log becomes
+# /var/volatile/log
+logfile=/var/local/bootlogd.log
+
+#
+# Create initial log files
+#
+if [ ! -f "$logfile" ] && touch "$logfile" >/dev/null 2>&1; then
+ echo "(Nothing has been logged yet.)" >| "$logfile"
+ chown root:adm "$logfile"
+ chmod 640 "$logfile"
+fi
+
case "$ACTION" in
start)
echo -n "Starting $DESC: "
@@ -44,9 +60,9 @@ case "$ACTION" in
then
umask 027
start-stop-daemon --start --quiet \
- --exec $DAEMON -- -r
+ --exec $DAEMON -- -r -l $logfile
else
- $DAEMON -r
+ $DAEMON -r -l $logfile
fi
echo "$NAME."
;;
@@ -70,13 +86,17 @@ case "$ACTION" in
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --exec $DAEMON
sleep 1
- start-stop-daemon --start --quiet --exec $DAEMON
+ start-stop-daemon --start --quiet --exec $DAEMON -- -l $logfile
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] 13+ messages in thread
* [PATCH 3/6] nfs-utils: add init.d/nfsserver status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
2013-08-20 3:25 ` [PATCH 1/6] dbus: add init.d/dbus-1 status command for LSB compliance jackie.huang
2013-08-20 3:25 ` [PATCH 2/6] sysvinit: add init.d/bootlogd " jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
2013-08-20 6:36 ` Phil Blundell
2013-08-20 3:25 ` [PATCH 4/6] openssh: add init.d/sshd " jackie.huang
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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 | 25 ++++++++++++++++++-
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index e460e26..494af2e 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
@@ -23,6 +25,7 @@ test -r /etc/default/nfsd && . /etc/default/nfsd
test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd
test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd
test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
+test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
#
# The user mode program must also exist (it just starts the kernel
# threads using the kernel module code).
@@ -75,6 +78,17 @@ stop_mountd(){
#
#nfsd
start_nfsd(){
+ modprobe -q nfsd
+ grep -q nfsd /proc/filesystems || {
+ echo NFS daemon support not enabled in kernel
+ exit 1
+ }
+ grep -q nfsd /proc/mounts || mount -t nfsd nfsd /proc/fs/nfsd
+ grep -q nfsd /proc/mounts || {
+ echo nfsd filesystem could not be mounted at /proc/fs/nfsd
+ exit 1
+ }
+
echo -n "starting $1 nfsd kernel threads: "
start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
echo done
@@ -113,14 +127,14 @@ stop_nfsd(){
#statd
start_statd(){
echo -n "starting statd: "
- start-stop-daemon --start --exec "$NFS_STATD"
+ start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
echo done
}
stop_statd(){
# WARNING: this kills any process with the executable
# name 'statd'.
echo -n 'stopping statd: '
- start-stop-daemon --stop --quiet --signal 1 --name statd
+ start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID"
echo done
}
#----------------------------------------------------------------------
@@ -141,6 +155,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] 13+ messages in thread
* [PATCH 4/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
` (2 preceding siblings ...)
2013-08-20 3:25 ` [PATCH 3/6] nfs-utils: add init.d/nfsserver " jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
2013-08-22 6:42 ` Khem Raj
2013-08-20 3:25 ` [PATCH 5/6] sysklogd: add init.d/syslog " jackie.huang
2013-08-20 3:25 ` [PATCH 6/6] at: add init.d/atd " jackie.huang
5 siblings, 1 reply; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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 | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
index 6beec84..6bbc573 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
@@ -46,6 +49,11 @@ check_keys() {
fi
}
+rh_status() {
+ status /usr/sbin/sshd;
+ return $?
+}
+
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
@@ -84,8 +92,13 @@ case "$1" in
echo "."
;;
+ status)
+ rh_status;
+ exit $?
+ ;;
+
*)
- 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] 13+ messages in thread
* [PATCH 5/6] sysklogd: add init.d/syslog status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
` (3 preceding siblings ...)
2013-08-20 3:25 ` [PATCH 4/6] openssh: add init.d/sshd " jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
2013-08-20 3:25 ` [PATCH 6/6] at: add init.d/atd " jackie.huang
5 siblings, 0 replies; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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..c966725 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] 13+ messages in thread
* [PATCH 6/6] at: add init.d/atd status command for LSB compliance
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
` (4 preceding siblings ...)
2013-08-20 3:25 ` [PATCH 5/6] sysklogd: add init.d/syslog " jackie.huang
@ 2013-08-20 3:25 ` jackie.huang
5 siblings, 0 replies; 13+ messages in thread
From: jackie.huang @ 2013-08-20 3:25 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] 13+ messages in thread
* Re: [PATCH 3/6] nfs-utils: add init.d/nfsserver status command for LSB compliance
2013-08-20 3:25 ` [PATCH 3/6] nfs-utils: add init.d/nfsserver " jackie.huang
@ 2013-08-20 6:36 ` Phil Blundell
0 siblings, 0 replies; 13+ messages in thread
From: Phil Blundell @ 2013-08-20 6:36 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
On Tue, 2013-08-20 at 11:25 +0800, jackie.huang@windriver.com wrote:
> @@ -23,6 +25,7 @@ test -r /etc/default/nfsd && . /etc/default/nfsd
> test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd
> test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd
> test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd
> +test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid
> #
> # The user mode program must also exist (it just starts the kernel
> # threads using the kernel module code).
> @@ -75,6 +78,17 @@ stop_mountd(){
> #
> #nfsd
> start_nfsd(){
> + modprobe -q nfsd
> + grep -q nfsd /proc/filesystems || {
> + echo NFS daemon support not enabled in kernel
> + exit 1
> + }
> + grep -q nfsd /proc/mounts || mount -t nfsd nfsd /proc/fs/nfsd
> + grep -q nfsd /proc/mounts || {
> + echo nfsd filesystem could not be mounted at /proc/fs/nfsd
> + exit 1
> + }
> +
> echo -n "starting $1 nfsd kernel threads: "
> start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
> echo done
> @@ -113,14 +127,14 @@ stop_nfsd(){
> #statd
> start_statd(){
> echo -n "starting statd: "
> - start-stop-daemon --start --exec "$NFS_STATD"
> + start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID"
> echo done
> }
> stop_statd(){
> # WARNING: this kills any process with the executable
> # name 'statd'.
> echo -n 'stopping statd: '
> - start-stop-daemon --stop --quiet --signal 1 --name statd
> + start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID"
> echo done
> }
> #----------------------------------------------------------------------
This stuff doesn't seem to e directly related to the "status" command.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/6] sysvinit: add init.d/bootlogd status command for LSB compliance
2013-08-20 3:25 ` [PATCH 2/6] sysvinit: add init.d/bootlogd " jackie.huang
@ 2013-08-20 6:39 ` Phil Blundell
2013-08-20 9:33 ` jhuang0
0 siblings, 1 reply; 13+ messages in thread
From: Phil Blundell @ 2013-08-20 6:39 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
On Tue, 2013-08-20 at 11:25 +0800, jackie.huang@windriver.com wrote:
> @@ -37,6 +40,19 @@ case "$0" in
> ;;
> esac
>
> +# default /var/log/boot is not an option since /var/log becomes
> +# /var/volatile/log
> +logfile=/var/local/bootlogd.log
> +
> +#
> +# Create initial log files
> +#
> +if [ ! -f "$logfile" ] && touch "$logfile" >/dev/null 2>&1; then
> + echo "(Nothing has been logged yet.)" >| "$logfile"
> + chown root:adm "$logfile"
> + chmod 640 "$logfile"
> +fi
> +
> case "$ACTION" in
> start)
> echo -n "Starting $DESC: "
> @@ -44,9 +60,9 @@ case "$ACTION" in
> then
> umask 027
> start-stop-daemon --start --quiet \
> - --exec $DAEMON -- -r
> + --exec $DAEMON -- -r -l $logfile
> else
> - $DAEMON -r
> + $DAEMON -r -l $logfile
> fi
> echo "$NAME."
> ;;
It's not totally obvious that the changes are related to the "status"
command. If you're creating new logfiles that didn't exist previously
then I think the commit message ought to explain why.
p.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/6] sysvinit: add init.d/bootlogd status command for LSB compliance
2013-08-20 6:39 ` Phil Blundell
@ 2013-08-20 9:33 ` jhuang0
0 siblings, 0 replies; 13+ messages in thread
From: jhuang0 @ 2013-08-20 9:33 UTC (permalink / raw)
To: Phil Blundell; +Cc: openembedded-core
On 8/20/2013 2:39 PM, Phil Blundell wrote:
> On Tue, 2013-08-20 at 11:25 +0800, jackie.huang@windriver.com wrote:
>> @@ -37,6 +40,19 @@ case "$0" in
>> ;;
>> esac
>>
>> +# default /var/log/boot is not an option since /var/log becomes
>> +# /var/volatile/log
>> +logfile=/var/local/bootlogd.log
>> +
>> +#
>> +# Create initial log files
>> +#
>> +if [ ! -f "$logfile" ] && touch "$logfile" >/dev/null 2>&1; then
>> + echo "(Nothing has been logged yet.)" >| "$logfile"
>> + chown root:adm "$logfile"
>> + chmod 640 "$logfile"
>> +fi
>> +
>> case "$ACTION" in
>> start)
>> echo -n "Starting $DESC: "
>> @@ -44,9 +60,9 @@ case "$ACTION" in
>> then
>> umask 027
>> start-stop-daemon --start --quiet \
>> - --exec $DAEMON -- -r
>> + --exec $DAEMON -- -r -l $logfile
>> else
>> - $DAEMON -r
>> + $DAEMON -r -l $logfile
>> fi
>> echo "$NAME."
>> ;;
>
> It's not totally obvious that the changes are related to the "status"
> command. If you're creating new logfiles that didn't exist previously
> then I think the commit message ought to explain why.
>
Sorry, my mistake to involve some other patch when I got the patch from
our layer, I will remake the patches.
Thanks,
Jackie
> p.
>
>
>
>
--
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] 13+ messages in thread
* Re: [PATCH 4/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-20 3:25 ` [PATCH 4/6] openssh: add init.d/sshd " jackie.huang
@ 2013-08-22 6:42 ` Khem Raj
2013-08-22 7:02 ` jhuang0
0 siblings, 1 reply; 13+ messages in thread
From: Khem Raj @ 2013-08-22 6:42 UTC (permalink / raw)
To: jackie.huang; +Cc: openembedded-core
Hi Jackie
One thing comes to mind is that these scripts are hardcoding the binaries and may be it would be
nicer to replace the bindir, libdir and so on at install time, that would make them flexible where /usr
is not used e.g. but I guess thats a general problem with capture init scripts all around probably.
On Aug 19, 2013, at 8:25 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 | 15 ++++++++++++++-
> 1 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
> index 6beec84..6bbc573 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
> @@ -46,6 +49,11 @@ check_keys() {
> fi
> }
>
> +rh_status() {
> + status /usr/sbin/sshd;
> + return $?
> +}
> +
> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>
> case "$1" in
> @@ -84,8 +92,13 @@ case "$1" in
> echo "."
> ;;
>
> + status)
> + rh_status;
> + exit $?
> + ;;
> +
> *)
> - 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
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 4/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-22 6:42 ` Khem Raj
@ 2013-08-22 7:02 ` jhuang0
2013-08-22 7:15 ` ChenQi
0 siblings, 1 reply; 13+ messages in thread
From: jhuang0 @ 2013-08-22 7:02 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On 8/22/2013 2:42 PM, Khem Raj wrote:
> Hi Jackie
>
> One thing comes to mind is that these scripts are hardcoding the binaries and may be it would be
> nicer to replace the bindir, libdir and so on at install time, that would make them flexible where /usr
> is not used e.g. but I guess thats a general problem with capture init scripts all around probably.
Yes it is general problem that almost all init scripts have these
hardcoding binaries, maybe we need a requirement and do that for all
these scripts with a plan.
Thanks,
Jackie
>
> On Aug 19, 2013, at 8:25 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 | 15 ++++++++++++++-
>> 1 files changed, 14 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>> index 6beec84..6bbc573 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
>> @@ -46,6 +49,11 @@ check_keys() {
>> fi
>> }
>>
>> +rh_status() {
>> + status /usr/sbin/sshd;
>> + return $?
>> +}
>> +
>> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>>
>> case "$1" in
>> @@ -84,8 +92,13 @@ case "$1" in
>> echo "."
>> ;;
>>
>> + status)
>> + rh_status;
>> + exit $?
>> + ;;
>> +
>> *)
>> - 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
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
--
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] 13+ messages in thread
* Re: [PATCH 4/6] openssh: add init.d/sshd status command for LSB compliance
2013-08-22 7:02 ` jhuang0
@ 2013-08-22 7:15 ` ChenQi
0 siblings, 0 replies; 13+ messages in thread
From: ChenQi @ 2013-08-22 7:15 UTC (permalink / raw)
To: openembedded-core
On 08/22/2013 03:02 PM, jhuang0 wrote:
>
>
> On 8/22/2013 2:42 PM, Khem Raj wrote:
>> Hi Jackie
>>
>> One thing comes to mind is that these scripts are hardcoding the
>> binaries and may be it would be
>> nicer to replace the bindir, libdir and so on at install time, that
>> would make them flexible where /usr
>> is not used e.g. but I guess thats a general problem with capture
>> init scripts all around probably.
>
> Yes it is general problem that almost all init scripts have these
> hardcoding binaries, maybe we need a requirement and do that for all
> these scripts with a plan.
>
> Thanks,
> Jackie
>
Agree.
If we're going to do this, we need to take the postinst scripts into
consideration, as the postinst scripts have the same problem.
Best Regards,
Chen Qi
>>
>> On Aug 19, 2013, at 8:25 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 | 15
>>> ++++++++++++++-
>>> 1 files changed, 14 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>>> b/meta/recipes-connectivity/openssh/openssh-6.2p2/init
>>> index 6beec84..6bbc573 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
>>> @@ -46,6 +49,11 @@ check_keys() {
>>> fi
>>> }
>>>
>>> +rh_status() {
>>> + status /usr/sbin/sshd;
>>> + return $?
>>> +}
>>> +
>>> export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
>>>
>>> case "$1" in
>>> @@ -84,8 +92,13 @@ case "$1" in
>>> echo "."
>>> ;;
>>>
>>> + status)
>>> + rh_status;
>>> + exit $?
>>> + ;;
>>> +
>>> *)
>>> - 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
>>>
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-08-22 7:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 3:25 [PATCH 0/6] Add status command for LSB compliance for some packages jackie.huang
2013-08-20 3:25 ` [PATCH 1/6] dbus: add init.d/dbus-1 status command for LSB compliance jackie.huang
2013-08-20 3:25 ` [PATCH 2/6] sysvinit: add init.d/bootlogd " jackie.huang
2013-08-20 6:39 ` Phil Blundell
2013-08-20 9:33 ` jhuang0
2013-08-20 3:25 ` [PATCH 3/6] nfs-utils: add init.d/nfsserver " jackie.huang
2013-08-20 6:36 ` Phil Blundell
2013-08-20 3:25 ` [PATCH 4/6] openssh: add init.d/sshd " jackie.huang
2013-08-22 6:42 ` Khem Raj
2013-08-22 7:02 ` jhuang0
2013-08-22 7:15 ` ChenQi
2013-08-20 3:25 ` [PATCH 5/6] sysklogd: add init.d/syslog " jackie.huang
2013-08-20 3:25 ` [PATCH 6/6] at: add init.d/atd " jackie.huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox