[nfs-utils] 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:32 UTC 2015
commit 9b8382d7ced9635d6c54ebc964284a737f9bb3b2
Author: Steve Dickson <steved at redhat.com>
Date: Mon Feb 9 12:17:04 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>
...tatd-bg.patch => nfs-utils-1.3.2-statd-bg.patch | 0
nfs-utils-1.3.2-statd-nowait.patch | 35 ++++++++++++++++++++
nfs-utils.spec | 32 +++++++++++++-----
3 files changed, 58 insertions(+), 9 deletions(-)
---
diff --git a/nfs-utils-1.2.1-statd-bg.patch b/nfs-utils-1.3.2-statd-bg.patch
similarity index 100%
rename from nfs-utils-1.2.1-statd-bg.patch
rename to nfs-utils-1.3.2-statd-bg.patch
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 d503c9c..ec66380 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.2
-Release: 0.1%{?dist}
+Release: 0.2%{?dist}
Epoch: 1
# group all 32bit related archs
@@ -15,7 +15,8 @@ Source2: nfs.sysconfig
Source3: nfs-utils_env.sh
Source4: lockd.conf
-Patch001: nfs-utils-1.2.1-statd-bg.patch
+Patch001: nfs-utils-1.3.2-statd-bg.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
@@ -73,6 +74,7 @@ This package also contains the mount.nfs and umount.nfs program.
%setup -q
%patch001 -p1
+%patch002 -p1
%patch100 -p1
%patch101 -p1
@@ -170,13 +172,21 @@ for x in gssd 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
@@ -185,19 +195,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
-if [ "$?" -eq 1 ]; then
+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 || :
+ -s /sbin/nologin -u %{nfsnobody_uid} -d /var/lib/nfs nfsnobody >/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
@@ -297,6 +307,10 @@ fi
/sbin/umount.nfs4
%changelog
+* Mon Feb 9 2015 Steve Dickson <steved at redhat.com> 1.3.2-0.2
+- 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)
+
* Sun Feb 1 2015 Steve Dickson <steved at redhat.com> 1.3.2-0.1
- statd: Fix test for foreground mode (bz 1188040)
More information about the scm-commits
mailing list