[nfs-utils/f16] - Added StandardError=syslog+console to all the service files so startup errors will be logged. -

Steve Dickson steved at fedoraproject.org
Wed Aug 24 18:45:26 UTC 2011


commit c99bff8089c0b2776d42a2e39b22086bfdc0b1ce
Author: Steve Dickson <steved at redhat.com>
Date:   Wed Aug 24 14:38:38 2011 -0400

    - Added StandardError=syslog+console to all the service files
      so startup errors will be logged.
    - Changed exportfs to only log errors on existing /etc/export.d
      directory, which eliminates a needless syslog entry.
    - Automount /proc/fs/nfsd for rpc.nfsd
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-idmap.service                    |    1 +
 nfs-lock.service                     |    1 +
 nfs-secure-server.service            |    1 +
 nfs-secure.service                   |    1 +
 nfs-server.preconfig                 |    1 -
 nfs-server.service                   |    4 +++-
 nfs-utils-1.2.4-exportfs-nolog.patch |   13 +++++++++++++
 nfs-utils.spec                       |   14 ++++++++++++--
 proc-fs-nfsd.mount                   |    8 ++++++++
 9 files changed, 40 insertions(+), 4 deletions(-)
---
diff --git a/nfs-idmap.service b/nfs-idmap.service
index 77fe49e..dce10f8 100644
--- a/nfs-idmap.service
+++ b/nfs-idmap.service
@@ -5,6 +5,7 @@ Requires=var-lib-nfs-rpc_pipefs.mount
 
 [Service]
 Type=forking
+StandardError=syslog+console
 EnvironmentFile=-/etc/sysconfig/nfs
 ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS
 
diff --git a/nfs-lock.service b/nfs-lock.service
index fda62a7..15cfdfc 100644
--- a/nfs-lock.service
+++ b/nfs-lock.service
@@ -4,6 +4,7 @@ After=network.target rpcbind.service
 
 [Service]
 Type=forking
+StandardError=syslog+console
 EnvironmentFile=-/etc/sysconfig/nfs
 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-lock.preconfig
 ExecStart=/sbin/rpc.statd $STATDARG
diff --git a/nfs-secure-server.service b/nfs-secure-server.service
index b6cc7e2..b3a583b 100644
--- a/nfs-secure-server.service
+++ b/nfs-secure-server.service
@@ -5,6 +5,7 @@ After=var-lib-nfs-rpc_pipefs.mount nfs-server.service
 
 [Service]
 Type=forking
+StandardError=syslog+console
 EnvironmentFile=-/etc/sysconfig/nfs
 ExecStart=/usr/sbin/rpc.svcgssd $RPCSVCGSSDARGS
 
diff --git a/nfs-secure.service b/nfs-secure.service
index 47c840b..8500d6a 100644
--- a/nfs-secure.service
+++ b/nfs-secure.service
@@ -5,6 +5,7 @@ Requires=var-lib-nfs-rpc_pipefs.mount
 
 [Service]
 Type=forking
+StandardError=syslog+console
 EnvironmentFile=-/etc/sysconfig/nfs
 ExecStart=/usr/sbin/rpc.gssd $RPCGSSDARGS
 
diff --git a/nfs-server.preconfig b/nfs-server.preconfig
index a5e156d..d965dbe 100644
--- a/nfs-server.preconfig
+++ b/nfs-server.preconfig
@@ -4,7 +4,6 @@
 
 # Set v4 grace period if requested
 if [ -n "$NFSD_V4_GRACE" ]; then
-	/sbin/modprobe -q nfsd
 	echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
 fi
 
diff --git a/nfs-server.service b/nfs-server.service
index e126709..bfe6baa 100644
--- a/nfs-server.service
+++ b/nfs-server.service
@@ -1,9 +1,11 @@
 [Unit]
 Description=NFS Server
-After=network.target rpcbind.service
+Requires=proc-fs-nfsd.mount
+After=network.target rpcbind.service proc-fs-nfsd.mount
 
 [Service]
 Type=forking
+StandardError=syslog+console
 EnvironmentFile=-/etc/sysconfig/nfs
 ExecStartPre=/usr/lib/nfs-utils/scripts/nfs-server.preconfig
 ExecStartPre=-/usr/sbin/rpc.rquotad $RPCRQUOTADOPTS
diff --git a/nfs-utils-1.2.4-exportfs-nolog.patch b/nfs-utils-1.2.4-exportfs-nolog.patch
new file mode 100644
index 0000000..2105a80
--- /dev/null
+++ b/nfs-utils-1.2.4-exportfs-nolog.patch
@@ -0,0 +1,13 @@
+diff -up nfs-utils-1.2.4/utils/exportfs/exportfs.c.orig nfs-utils-1.2.4/utils/exportfs/exportfs.c
+--- nfs-utils-1.2.4/utils/exportfs/exportfs.c.orig	2011-06-30 09:00:42.000000000 -0400
++++ nfs-utils-1.2.4/utils/exportfs/exportfs.c	2011-08-24 11:00:19.007352000 -0400
+@@ -498,6 +498,9 @@ export_d_read(const char *dname)
+ 	struct dirent **namelist = NULL;
+ 
+ 
++	if (access(dname, X_OK) < 0)
++		return;
++
+ 	n = scandir(dname, &namelist, NULL, versionsort);
+ 	if (n < 0)
+ 		xlog(L_NOTICE, "scandir %s: %s\n", dname, strerror(errno));
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 1df6a18..f45a6a4 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -2,7 +2,7 @@ Summary: NFS utilities and supporting clients and daemons for the kernel NFS ser
 Name: nfs-utils
 URL: http://sourceforge.net/projects/nfs
 Version: 1.2.4
-Release: 6%{?dist}
+Release: 7%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -17,7 +17,8 @@ Source13: nfs-secure-server.service
 Source14: nfs-server.service
 Source15: nfs-idmap.service
 Source16: var-lib-nfs-rpc_pipefs.mount
-%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16}
+Source17: proc-fs-nfsd.mount
+%define nfs_services %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17}
 
 Source50: nfs-lock.preconfig
 Source51: nfs-server.preconfig
@@ -26,6 +27,7 @@ Source52: nfs-server.postconfig
 
 Patch001: nfs-utils.1.2.5-rc1.patch
 Patch002: nfs-utils-1.2.3-libmount-api-2.20.patch
+Patch003: nfs-utils-1.2.4-exportfs-nolog.patch
 
 Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.2-statdpath.patch
@@ -84,6 +86,7 @@ This package also contains the mount.nfs and umount.nfs program.
 
 %patch001 -p1
 %patch002 -p1
+%patch003 -p1
 
 %patch100 -p1
 %patch101 -p1
@@ -271,6 +274,13 @@ fi
 %attr(4755,root,root)   /sbin/umount.nfs4
 
 %changelog
+* Wed Aug 24 2011 Steve Dickson <steved at redhat.com> 1.2.4-7
+- Added StandardError=syslog+console to all the service files
+  so startup errors will be logged. 
+- Changed exportfs to only log errors on existing /etc/export.d 
+  directory, which eliminates a needless syslog entry.
+- Automount /proc/fs/nfsd for rpc.nfsd 
+
 * Wed Aug 10 2011 Steve Dickson <steved at redhat.com> 1.2.4-6
 - Fixed some bugs in the triggerun script as well in
   the nfs-server scripts (bz 699040).
diff --git a/proc-fs-nfsd.mount b/proc-fs-nfsd.mount
new file mode 100644
index 0000000..e5ee6fb
--- /dev/null
+++ b/proc-fs-nfsd.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPC Pipe File System 
+DefaultDependencies=no
+
+[Mount]
+What=sunrpc
+Where=/proc/fs/nfsd
+Type=nfsd


More information about the scm-commits mailing list