diff options
| author | Wenzong Fan <wenzong.fan@windriver.com> | 2013-12-11 04:07:06 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-14 09:11:16 +0000 |
| commit | 46215bd89e2e1136d6af7bacd5931952ee21716b (patch) | |
| tree | 73590dd6a70a6381cfeaf3fab8afbea7a1a07877 | |
| parent | 9b43c57eb2ccc0815ed65843ffb1247633b930e6 (diff) | |
| download | poky-46215bd89e2e1136d6af7bacd5931952ee21716b.tar.gz | |
rpcbind: fix init status and exit code
Print status messages and exit with proper code. This also allows debian
service script to get rpcbind status correctly.
(From OE-Core rev: f07c2519c4ccfc847d7184d7eada6d7620950277)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-extended/rpcbind/rpcbind/init.d | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/init.d b/meta/recipes-extended/rpcbind/rpcbind/init.d index d418673aa0..67499aa828 100644 --- a/meta/recipes-extended/rpcbind/rpcbind/init.d +++ b/meta/recipes-extended/rpcbind/rpcbind/init.d | |||
| @@ -16,6 +16,9 @@ | |||
| 16 | # RPC include NFS and NIS. | 16 | # RPC include NFS and NIS. |
| 17 | ### END INIT INFO | 17 | ### END INIT INFO |
| 18 | 18 | ||
| 19 | # Source function library. | ||
| 20 | . /etc/init.d/functions | ||
| 21 | |||
| 19 | test -f /sbin/rpcbind || exit 0 | 22 | test -f /sbin/rpcbind || exit 0 |
| 20 | 23 | ||
| 21 | OPTIONS="" | 24 | OPTIONS="" |
| @@ -73,8 +76,7 @@ case "$1" in | |||
| 73 | start $OPTIONS | 76 | start $OPTIONS |
| 74 | ;; | 77 | ;; |
| 75 | status) | 78 | status) |
| 76 | pidof /sbin/rpcbind >/dev/null | 79 | status /sbin/rpcbind |
| 77 | exit $? | ||
| 78 | ;; | 80 | ;; |
| 79 | *) | 81 | *) |
| 80 | echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" | 82 | echo "Usage: /etc/init.d/rpcbind {start|stop|force-reload|restart|status}" |
| @@ -82,4 +84,4 @@ case "$1" in | |||
| 82 | ;; | 84 | ;; |
| 83 | esac | 85 | esac |
| 84 | 86 | ||
| 85 | exit 0 | 87 | exit $? |
