Patchwork [5/6] nfs-utils: add init.d/nfsserver status command for LSB compliance

login
register
mail settings
Submitter jackie huang
Date Aug. 21, 2013, 6:15 a.m.
Message ID <00b70d017db692cbb7d5965de26726ae0a695f88.1377064624.git.jackie.huang@windriver.com>
Download mbox | patch
Permalink /patch/56111/
State New
Headers show

Comments

jackie huang - Aug. 21, 2013, 6:15 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>
---
 .../nfs-utils/nfs-utils/nfsserver                  |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Saul Wold - Aug. 21, 2013, 5:34 p.m.
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!
jackie huang - Aug. 22, 2013, 1:52 a.m.
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!
>
>

Patch

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