* [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently
@ 2016-07-03 16:46 Maxime Hadjinlian
2016-07-03 16:46 ` [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent Maxime Hadjinlian
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Maxime Hadjinlian @ 2016-07-03 16:46 UTC (permalink / raw)
To: buildroot
From: universe II <universeii@gmx.de>
Changed init script to start and stop all nfs daemons
in a consistent way. Using the same kill command,
start/stop the daemon, printout OK or FAIL and touch
or deleted necessary files.
Signed-off-by: Andreas Ehmanns <universeII@gmx.de>
[Maxime:
- Make it really consistent to stop the daemons as pointed out by Yann E. Morin
- Remove the -9]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
package/nfs-utils/S60nfs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
index 7a49c79..2d4e082 100755
--- a/package/nfs-utils/S60nfs
+++ b/package/nfs-utils/S60nfs
@@ -45,22 +45,22 @@ start() {
stop() {
# Stop daemons.
printf "Shutting down NFS mountd: "
- killall -q rpc.mountd
+ killall -q rpc.mountd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Shutting down NFS daemon: "
- kill -9 `pidof nfsd` 2>/dev/null
+ killall -q nfsd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Shutting down NFS services: "
/usr/sbin/exportfs -au
- rm -f /var/lock/subsys/nfs
- killall -q rpc.statd
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Stopping NFS statd: "
- killall -q rpc.statd
+ killall -q rpc.statd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
+ rm -f /var/lock/subsys/nfs
+ rm -f /var/run/rpc.statd.pid
rm -f /var/lock/subsys/nfslock
}
@@ -81,7 +81,7 @@ case "$1" in
touch /var/lock/subsys/nfs
;;
*)
- echo "Usage: nfs {start|stop|reload}"
+ echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent
2016-07-03 16:46 [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Maxime Hadjinlian
@ 2016-07-03 16:46 ` Maxime Hadjinlian
2016-07-03 16:54 ` Thomas Petazzoni
2016-07-03 16:53 ` [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Thomas Petazzoni
2016-07-04 9:42 ` Thomas Petazzoni
2 siblings, 1 reply; 6+ messages in thread
From: Maxime Hadjinlian @ 2016-07-03 16:46 UTC (permalink / raw)
To: buildroot
Use tabs everywhere still we don't have an official policy.
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
package/nfs-utils/S60nfs | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
index 2d4e082..893b1e4 100755
--- a/package/nfs-utils/S60nfs
+++ b/package/nfs-utils/S60nfs
@@ -17,7 +17,7 @@ CFG_FILE=/etc/default/nfsd
NR_THREADS=2
if [ -f "${CFG_FILE}" ]; then
- . "${CFG_FILE}"
+ . "${CFG_FILE}"
fi
@@ -66,23 +66,23 @@ stop() {
# See how we were called.
case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
- /usr/sbin/exportfs -r
- touch /var/lock/subsys/nfs
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|reload}"
- exit 1
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ reload)
+ /usr/sbin/exportfs -r
+ touch /var/lock/subsys/nfs
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
esac
exit 0
--
2.8.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently
2016-07-03 16:46 [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Maxime Hadjinlian
2016-07-03 16:46 ` [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent Maxime Hadjinlian
@ 2016-07-03 16:53 ` Thomas Petazzoni
2016-07-06 16:53 ` Andreas Ehmanns
2016-07-04 9:42 ` Thomas Petazzoni
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-07-03 16:53 UTC (permalink / raw)
To: buildroot
Hello,
Title should be:
package/nfs-utils: start/stop daemons consistently
On Sun, 3 Jul 2016 18:46:58 +0200, Maxime Hadjinlian wrote:
> From: universe II <universeii@gmx.de>
Please fix this "From" to be consistent with the Signed-off-by. I
forgot about it when applying the previous patches from Andreas.
>
> Changed init script to start and stop all nfs daemons
Please use the present "Change" and not the past "Changed". I don't
understand why people use the past tense in commit logs.
> in a consistent way. Using the same kill command,
> start/stop the daemon, printout OK or FAIL and touch
> or deleted necessary files.
>
> Signed-off-by: Andreas Ehmanns <universeII@gmx.de>
> [Maxime:
> - Make it really consistent to stop the daemons as pointed out by Yann E. Morin
Line too long, no? :)
> - Remove the -9]
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> package/nfs-utils/S60nfs | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
> index 7a49c79..2d4e082 100755
> --- a/package/nfs-utils/S60nfs
> +++ b/package/nfs-utils/S60nfs
> @@ -45,22 +45,22 @@ start() {
> stop() {
> # Stop daemons.
> printf "Shutting down NFS mountd: "
> - killall -q rpc.mountd
> + killall -q rpc.mountd 2>/dev/null
> [ $? = 0 ] && echo "OK" || echo "FAIL"
>
> printf "Shutting down NFS daemon: "
> - kill -9 `pidof nfsd` 2>/dev/null
> + killall -q nfsd 2>/dev/null
> [ $? = 0 ] && echo "OK" || echo "FAIL"
>
> printf "Shutting down NFS services: "
> /usr/sbin/exportfs -au
> - rm -f /var/lock/subsys/nfs
> - killall -q rpc.statd
> [ $? = 0 ] && echo "OK" || echo "FAIL"
>
> printf "Stopping NFS statd: "
> - killall -q rpc.statd
> + killall -q rpc.statd 2>/dev/null
> [ $? = 0 ] && echo "OK" || echo "FAIL"
> + rm -f /var/lock/subsys/nfs
> + rm -f /var/run/rpc.statd.pid
> rm -f /var/lock/subsys/nfslock
> }
>
> @@ -81,7 +81,7 @@ case "$1" in
> touch /var/lock/subsys/nfs
> ;;
> *)
> - echo "Usage: nfs {start|stop|reload}"
> + echo "Usage: $0 {start|stop|restart|reload}"
> exit 1
> esac
>
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent
2016-07-03 16:46 ` [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent Maxime Hadjinlian
@ 2016-07-03 16:54 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-07-03 16:54 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 3 Jul 2016 18:46:59 +0200, Maxime Hadjinlian wrote:
> Use tabs everywhere still we don't have an official policy.
>
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
I think we say "fix indentation" not "fix indent".
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently
2016-07-03 16:46 [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Maxime Hadjinlian
2016-07-03 16:46 ` [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent Maxime Hadjinlian
2016-07-03 16:53 ` [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Thomas Petazzoni
@ 2016-07-04 9:42 ` Thomas Petazzoni
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-07-04 9:42 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 3 Jul 2016 18:46:58 +0200, Maxime Hadjinlian wrote:
> From: universe II <universeii@gmx.de>
>
> Changed init script to start and stop all nfs daemons
> in a consistent way. Using the same kill command,
> start/stop the daemon, printout OK or FAIL and touch
> or deleted necessary files.
>
> Signed-off-by: Andreas Ehmanns <universeII@gmx.de>
> [Maxime:
> - Make it really consistent to stop the daemons as pointed out by Yann E. Morin
> - Remove the -9]
> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
> package/nfs-utils/S60nfs | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Both applied, with minor tweaks. Regarding the second patch, I really
wasn't sure since we don't have written rules about indentation in our
init scripts, it's the kind of things that tends to get changed in one
direction, and then in the other direction a few months later. But
anyway, since the patch was done, I applied it.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently
2016-07-03 16:53 ` [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Thomas Petazzoni
@ 2016-07-06 16:53 ` Andreas Ehmanns
0 siblings, 0 replies; 6+ messages in thread
From: Andreas Ehmanns @ 2016-07-06 16:53 UTC (permalink / raw)
To: buildroot
Dear all,
thanks for revising the patch series. As requested I will use the
present instead of the past in the future :-)
Regards,
Andreas
Am 03.07.2016 um 18:53 schrieb Thomas Petazzoni:
> Hello,
>
> Title should be:
>
> package/nfs-utils: start/stop daemons consistently
>
> On Sun, 3 Jul 2016 18:46:58 +0200, Maxime Hadjinlian wrote:
>> From: universe II <universeii@gmx.de>
> Please fix this "From" to be consistent with the Signed-off-by. I
> forgot about it when applying the previous patches from Andreas.
>
>> Changed init script to start and stop all nfs daemons
> Please use the present "Change" and not the past "Changed". I don't
> understand why people use the past tense in commit logs.
>
>> in a consistent way. Using the same kill command,
>> start/stop the daemon, printout OK or FAIL and touch
>> or deleted necessary files.
>>
>> Signed-off-by: Andreas Ehmanns <universeII@gmx.de>
>> [Maxime:
>> - Make it really consistent to stop the daemons as pointed out by Yann E. Morin
> Line too long, no? :)
>
>> - Remove the -9]
>> Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
>> ---
>> package/nfs-utils/S60nfs | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs
>> index 7a49c79..2d4e082 100755
>> --- a/package/nfs-utils/S60nfs
>> +++ b/package/nfs-utils/S60nfs
>> @@ -45,22 +45,22 @@ start() {
>> stop() {
>> # Stop daemons.
>> printf "Shutting down NFS mountd: "
>> - killall -q rpc.mountd
>> + killall -q rpc.mountd 2>/dev/null
>> [ $? = 0 ] && echo "OK" || echo "FAIL"
>>
>> printf "Shutting down NFS daemon: "
>> - kill -9 `pidof nfsd` 2>/dev/null
>> + killall -q nfsd 2>/dev/null
>> [ $? = 0 ] && echo "OK" || echo "FAIL"
>>
>> printf "Shutting down NFS services: "
>> /usr/sbin/exportfs -au
>> - rm -f /var/lock/subsys/nfs
>> - killall -q rpc.statd
>> [ $? = 0 ] && echo "OK" || echo "FAIL"
>>
>> printf "Stopping NFS statd: "
>> - killall -q rpc.statd
>> + killall -q rpc.statd 2>/dev/null
>> [ $? = 0 ] && echo "OK" || echo "FAIL"
>> + rm -f /var/lock/subsys/nfs
>> + rm -f /var/run/rpc.statd.pid
>> rm -f /var/lock/subsys/nfslock
>> }
>>
>> @@ -81,7 +81,7 @@ case "$1" in
>> touch /var/lock/subsys/nfs
>> ;;
>> *)
>> - echo "Usage: nfs {start|stop|reload}"
>> + echo "Usage: $0 {start|stop|restart|reload}"
>> exit 1
>> esac
>>
> Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-07-06 16:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03 16:46 [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Maxime Hadjinlian
2016-07-03 16:46 ` [Buildroot] [PATCH 2/2] package/nfs-utils: Fix indent Maxime Hadjinlian
2016-07-03 16:54 ` Thomas Petazzoni
2016-07-03 16:53 ` [Buildroot] [PATCH 1/2] Package nfs-utils: Start/stop daemons consistently Thomas Petazzoni
2016-07-06 16:53 ` Andreas Ehmanns
2016-07-04 9:42 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox