All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfs-utils: modify nfsserver init script indent
@ 2013-10-22  5:14 qiang.chen
  2013-10-29  9:47 ` Qiang Chen
  0 siblings, 1 reply; 2+ messages in thread
From: qiang.chen @ 2013-10-22  5:14 UTC (permalink / raw)
  To: openembedded-core

From: Qiang Chen <qiang.chen@windriver.com>

Using sysvinit testing service status, nfsserver status
allways display as [?] unknown.

This is because sysvinit package check whether service's
init script supporting status function or not by:
grep -qs "\Wstatus)" "$SERVICE"

So, this commit modified the indent for status etc, as
most service's init script does.

Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
---
 .../nfs-utils/nfs-utils/nfsserver                  |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index d7cf6e0..c263f14 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -144,26 +144,26 @@ stop_statd(){
 #  restart: stops and starts mountd
 #FIXME: need to create the /var/lib/nfs/... directories
 case "$1" in
-start)	create_directories
+  start)	create_directories
 	start_nfsd "$NFS_SERVERS"
 	start_mountd
 	start_statd
 	test -r /etc/exports && exportfs -a;;
-stop)	exportfs -ua
+  stop)	exportfs -ua
 	stop_statd
 	stop_mountd
 	stop_nfsd;;
-status)
+  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)
+  reload)	test -r /etc/exports && exportfs -r;;
+  restart)
 	$0 stop
 	$0 start;;
-*)	echo "Usage: $0 {start|stop|status|reload|restart}"
+  *)	echo "Usage: $0 {start|stop|status|reload|restart}"
 	exit 1;;
 esac
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfs-utils: modify nfsserver init script indent
  2013-10-22  5:14 [PATCH] nfs-utils: modify nfsserver init script indent qiang.chen
@ 2013-10-29  9:47 ` Qiang Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Qiang Chen @ 2013-10-29  9:47 UTC (permalink / raw)
  To: richard.purdie, Saul Wold; +Cc: openembedded-core

Hi richard and Saul,

Any comment for this patch ?
If it's OK, could you please help merge to oe-core at your earliest convenience ?


Thanks a lot !
Qiang

On 10/22/2013 01:14 PM, qiang.chen@windriver.com wrote:

> From: Qiang Chen <qiang.chen@windriver.com>
>
> Using sysvinit testing service status, nfsserver status
> allways display as [?] unknown.
>
> This is because sysvinit package check whether service's
> init script supporting status function or not by:
> grep -qs "\Wstatus)" "$SERVICE"
>
> So, this commit modified the indent for status etc, as
> most service's init script does.
>
> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
> ---
>   .../nfs-utils/nfs-utils/nfsserver                  |   12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> index d7cf6e0..c263f14 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> @@ -144,26 +144,26 @@ stop_statd(){
>   #  restart: stops and starts mountd
>   #FIXME: need to create the /var/lib/nfs/... directories
>   case "$1" in
> -start)	create_directories
> +  start)	create_directories
>   	start_nfsd "$NFS_SERVERS"
>   	start_mountd
>   	start_statd
>   	test -r /etc/exports && exportfs -a;;
> -stop)	exportfs -ua
> +  stop)	exportfs -ua
>   	stop_statd
>   	stop_mountd
>   	stop_nfsd;;
> -status)
> +  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)
> +  reload)	test -r /etc/exports && exportfs -r;;
> +  restart)
>   	$0 stop
>   	$0 start;;
> -*)	echo "Usage: $0 {start|stop|status|reload|restart}"
> +  *)	echo "Usage: $0 {start|stop|status|reload|restart}"
>   	exit 1;;
>   esac
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-29  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-22  5:14 [PATCH] nfs-utils: modify nfsserver init script indent qiang.chen
2013-10-29  9:47 ` Qiang Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.