- 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@redhat.com>
This commit is contained in:
Steve Dickson 2011-08-24 14:38:38 -04:00
parent 45233d4087
commit c1f844827f
9 changed files with 40 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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));

View File

@ -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@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@redhat.com> 1.2.4-6
- Fixed some bugs in the triggerun script as well in
the nfs-server scripts (bz 699040).

8
proc-fs-nfsd.mount Normal file
View File

@ -0,0 +1,8 @@
[Unit]
Description=RPC Pipe File System
DefaultDependencies=no
[Mount]
What=sunrpc
Where=/proc/fs/nfsd
Type=nfsd