From c1c752a810d509e1f643bfe290f758fcf826d057 Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Mon, 28 May 2018 17:26:04 -0500 Subject: [PATCH] Tweaked to default to running with NFSv4 disabled because it still needs work --- Makefile | 15 ++++++++++----- README | 1 + SNAP/nfs-server.init | 7 ++++--- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 README diff --git a/Makefile b/Makefile index 89c4b8d..c0f27b6 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,15 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = bash,glibc,libcap,libtirpc,rpcbind,util-linux +# !!! May want to create separate nfs-client/nfs-server packages !!! # + ARCH = x86_64 +DEPENDS = bash,dash,e2fsprogs,glibc,krb5,libcap,libevent,libnfsidmap,libtirpc,lvm2,openssl,tcp-wrappers,util-linux URL = https://sourceforge.net/projects/nfs/ REPO = server BRIEF = Utilities for managing NFS DESC = Utilities for managing NFS -SNAPVER = 1 +SNAPVER = 2 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -48,9 +50,9 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --without-tcp-wrappers \ - --disable-nfsv4 \ - --disable-gss \ + --with-tcp-wrappers \ + --enable-libmount-mount \ + --disable-nfsdcltrack \ --build=x86_64-snap-linux-gnu \ --host=x86_64-snap-linux-gnu \ --target=x86_64-snap-linux-gnu @@ -66,7 +68,10 @@ $(ROOT): $(SRCDIR)/binfile fi @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + install -d -m 0755 $(ROOT)/etc/default && \ install -d -m 0755 $(ROOT)/etc/init.d && \ + install -m 0644 $(SNAPDIR)/nfs-server.default \ + $(ROOT)/etc/default/nfs-server && \ install -m 0755 $(SNAPDIR)/nfs-server.init \ $(ROOT)/etc/init.d/nfs-server && \ install -m 0755 $(SNAPDIR)/statd.init \ diff --git a/README b/README new file mode 100644 index 0000000..7f4919d --- /dev/null +++ b/README @@ -0,0 +1 @@ +NFSv4 is probably still a bit broken, but v3 appears to be working ok. diff --git a/SNAP/nfs-server.init b/SNAP/nfs-server.init index 43a7f2f..b6277e6 100755 --- a/SNAP/nfs-server.init +++ b/SNAP/nfs-server.init @@ -15,15 +15,16 @@ NFSD="/sbin/rpc.nfsd" MOUNTD="/sbin/rpc.mountd" . /lib/lsb/init-functions -[ -f /etc/default/nfsd ] && . /etc/default/nfsd +[ -f /etc/default/nfs-server ] && . /etc/default/nfs-server case "$1" in start) log_init_msg "Starting nfsd" - start_daemon "$NFSD" && log_success_msg || log_failure_msg + start_daemon "$NFSD" "$RPCNFSDARGS" && log_success_msg || log_failure_msg log_init_msg "Starting mountd" - start_daemon "$MOUNTD" && log_success_msg || log_failure_msg + start_daemon "$MOUNTD" "$RPCMOUNTDARGS" && log_success_msg || \ + log_failure_msg log_init_msg "Exporting NFS Filesystems" /usr/sbin/exportfs -ra 2>&1 > /dev/null && log_success_msg ||