[nfs-utils/f21] Change statd-notify.service to not wait for network to come up (bz 1183293) Added the rpcuser group

Steve Dickson steved at fedoraproject.org
Mon Feb 9 19:10:27 UTC 2015


commit 8fba4193377d3ae87108d6054396eaa69cc10372
Author: Steve Dickson <steved at redhat.com>
Date:   Mon Feb 9 14:09:54 2015 -0500

    Change statd-notify.service to not wait for network to come up (bz 1183293)
    Added the rpcuser group before adding the rpcuser uid (bz 1165322)
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs-utils-1.3.2-statd-nowait.patch |   35 +++++++++++++++++++++++++++++++++++
 nfs-utils.spec                     |   27 ++++++++++++++++++++-------
 2 files changed, 55 insertions(+), 7 deletions(-)
---
diff --git a/nfs-utils-1.3.2-statd-nowait.patch b/nfs-utils-1.3.2-statd-nowait.patch
new file mode 100644
index 0000000..a29df36
--- /dev/null
+++ b/nfs-utils-1.3.2-statd-nowait.patch
@@ -0,0 +1,35 @@
+From 650633d4e956dc6b628da30c868e39fba76a0b29 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved at redhat.com>
+Date: Mon, 9 Feb 2015 08:54:54 -0500
+Subject: [PATCH] rpc-statd-notify: Don't wait for the network to come up
+
+rpc-statd-notify only needs to wait for the network
+interface to be configured not to be connected since
+it forks into background and will wait 15mins for
+the network to come up.
+
+This decrease boot times when networks are not
+and will not be connected.
+
+Signed-off-by: Steve Dickson <steved at redhat.com>
+Reported-By: Eric Work <work.eric at gmail.com>
+---
+ systemd/rpc-statd-notify.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
+index 941afe5..a655445 100644
+--- a/systemd/rpc-statd-notify.service
++++ b/systemd/rpc-statd-notify.service
+@@ -1,7 +1,7 @@
+ [Unit]
+ Description=Notify NFS peers of a restart
+ Requires=network-online.target
+-After=network-online.target nss-lookup.target
++After=network.target nss-lookup.target
+ 
+ # if we run an nfs server, it needs to be running before we
+ # tell clients that it has restarted.
+-- 
+2.1.0
+
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 8e8df58..3115c91 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.3.1
-Release: 6.0%{?dist}
+Release: 6.1%{?dist}
 Epoch: 1
 
 # group all 32bit related archs
@@ -16,6 +16,7 @@ Source3: nfs-utils_env.sh
 Source4: lockd.conf
 
 Patch001: nfs-utils-1.3.2.rc5.patch
+Patch002: nfs-utils-1.3.2-statd-nowait.patch
 
 Patch100: nfs-utils-1.2.1-statdpath-man.patch
 Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch
@@ -74,6 +75,7 @@ This package also contains the mount.nfs and umount.nfs program.
 %setup -q
 
 %patch001 -p1
+%patch002 -p1
 
 %patch100 -p1
 %patch101 -p1
@@ -172,13 +174,20 @@ for x in gssd svcgssd idmapd ; do
 done
 
 %define rpcuser_uid 29
+# Create rpcuser gid as long as it does not already exist
+cat /etc/group | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null
+if [ "$?" -eq 1 ]; then
+    /usr/sbin/groupadd -g %{rpcuser_uid} rpcuser >/dev/null || :
+else
+    /usr/sbin/groupmod -g %{rpcuser_uid} rpcuser >/dev/null || :
+fi
 # Create rpcuser uid as long as it does not already exist.
 cat /etc/passwd | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null
 if [ "$?" -eq 1 ]; then
     /usr/sbin/useradd -l -c "RPC Service User" -r -g %{rpcuser_uid} \
-        -s /sbin/nologin -u %{rpcuser_uid} -d /var/lib/nfs rpcuser 2>/dev/null || :
+        -s /sbin/nologin -u %{rpcuser_uid} -d /var/lib/nfs rpcuser >/dev/null || :
 else
- /usr/sbin/usermod -u %{rpcuser_uid} -g %{rpcuser_uid} rpcuser 2>/dev/null || :
+ /usr/sbin/usermod -u %{rpcuser_uid} -g %{rpcuser_uid} rpcuser >/dev/null || :
 fi 
 
 # Using the 16-bit value of -2 for the nfsnobody uid and gid
@@ -187,19 +196,19 @@ fi
 # Create nfsnobody gid as long as it does not already exist
 cat /etc/group | cut -d':' -f 1 | grep --quiet nfsnobody 2>/dev/null
 if [ "$?" -eq 1 ]; then
-    /usr/sbin/groupadd -g %{nfsnobody_uid} nfsnobody 2>/dev/null || :
+    /usr/sbin/groupadd -g %{nfsnobody_uid} nfsnobody >/dev/null || :
 else
-    /usr/sbin/groupmod -g %{nfsnobody_uid} nfsnobody 2>/dev/null || :
+    /usr/sbin/groupmod -g %{nfsnobody_uid} nfsnobody >/dev/null || :
 fi
 
 # Create nfsnobody uid as long as it does not already exist.
-cat /etc/passwd | cut -d':' -f 1 | grep --quiet nfsnobody 2>/dev/null
+cat /etc/passwd | cut -d':' -f 1 | grep --quiet nfsnobody >/dev/null
 if [ "$?" -eq 1 ]; then
     /usr/sbin/useradd -l -c "Anonymous NFS User" -r -g %{nfsnobody_uid} \
 		-s /sbin/nologin -u %{nfsnobody_uid} -d /var/lib/nfs nfsnobody 2>/dev/null || :
 else
 
-   /usr/sbin/usermod -u %{nfsnobody_uid} -g %{nfsnobody_uid} nfsnobody 2>/dev/null || :
+   /usr/sbin/usermod -u %{nfsnobody_uid} -g %{nfsnobody_uid} nfsnobody >/dev/null || :
 fi
 
 %post
@@ -300,6 +309,10 @@ fi
 /sbin/umount.nfs4
 
 %changelog
+* Mon Feb  9 2015 Steve Dickson <steved at redhat.com> 1.3.1-6.1
+- Change statd-notify.service to not wait for network to come up (bz 1183293)
+- Added the rpcuser group before adding the rpcuser uid (bz 1165322)
+
 * Mon Jan 19 2015 Steve Dickson <steved at redhat.com> 1.3.1-6.0
 - Set the GSS_USE_PROXY variable in nfs-utils_env.sh (bz 1183787)
 


More information about the scm-commits mailing list