Skip to contentSkip to conversation

A few small nfsdcld fixes

PATCH In review Scott Mayhew 2 participants 5 messages Nov 26, 2019 – Dec 9, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover A few small nfsdcld fixes

The first two patches fix problems I noticed when trying to build an rpm package w/ nfsdcld enabled. The third patch fixes an issue I found trying to use nfsdcld on a ppc64le system.

Scott Mayhew (3):
nfsdcld: don't override sbindir
systemd: install nfsdcld.service when nfsdcld is enabled
nfsdcld: getopt_long() returns an int, not a char

 systemd/Makefile.am       | 5 +++++
 utils/nfsdcld/Makefile.am | 4 ----
 utils/nfsdcld/nfsdcld.c   | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.2
#1 lore raw

PATCH 1/3 nfsdcld: don't override sbindir

According to the guidelines in hier(7), nfsdcld should live in /usr/sbin and not /sbin. Plus, the nfsdcld.service systemd unit file is looking for it in /usr/sbin.

---
 utils/nfsdcld/Makefile.am | 4 ----
 1 file changed, 4 deletions(-)
utils/nfsdcld/Makefile.am +0 -4
index 2c4e5a1..273d64f 100644
@@ -1,9 +1,5 @@
 ## Process this file with automake to produce Makefile.in
 
-# These binaries go in /sbin (not /usr/sbin), and that cannot be
-# overridden at config time. The kernel "knows" the /sbin name.
-sbindir = /sbin
-
 man8_MANS	= nfsdcld.man
 EXTRA_DIST	= $(man8_MANS)
 
Signature · 1 line
2.17.2
#2 lore raw

PATCH 2/3 systemd: install nfsdcld.service when nfsdcld is enabled

In reply to Scott Mayhew
---
 systemd/Makefile.am | 5 +++++
 1 file changed, 5 insertions(+)
systemd/Makefile.am +5 -0
index 590258a..75cdd9f 100644
@@ -36,6 +36,11 @@ unit_files += \
 endif
 endif
 
+if CONFIG_NFSDCLD
+unit_files += \
+    nfsdcld.service
+endif
+
 man5_MANS	= nfs.conf.man
 man7_MANS	= nfs.systemd.man
 EXTRA_DIST = $(unit_files) $(man5_MANS) $(man7_MANS)
Signature · 1 line
2.17.2
#3 lore raw

PATCH 3/3 nfsdcld: getopt_long() returns an int, not a char

In reply to Scott Mayhew

This was causing nfsdcld to spit out a usage message instead of starting up on non-x86_64 arches.

---
 utils/nfsdcld/nfsdcld.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/nfsdcld/nfsdcld.c +1 -1
index 9297df5..2ad1001 100644
@@ -737,7 +737,7 @@ out:
 int
 main(int argc, char **argv)
 {
-	char arg;
+	int arg;
 	int rc = 0;
 	bool foreground = false;
 	char *progname;
Signature · 1 line
2.17.2
#4 lore raw
In reply to Scott Mayhew
Quoted 9 lines · Scott Mayhew

The first two patches fix problems I noticed when trying to build an rpm package w/ nfsdcld enabled. The third patch fixes an issue I found trying to use nfsdcld on a ppc64le system.

Scott Mayhew (3):
nfsdcld: don't override sbindir
systemd: install nfsdcld.service when nfsdcld is enabled
nfsdcld: getopt_long() returns an int, not a char

Quoted 5 lines
 systemd/Makefile.am       | 5 +++++
 utils/nfsdcld/Makefile.am | 4 ----
 utils/nfsdcld/nfsdcld.c   | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

Series committed... (tag: nfs-utils-2-4-3-rc3)

steved.