Blame SOURCES/nfs-utils-1.3.0-systemd-idmapd.patch

4f2874
diff -up nfs-utils-1.3.0/systemd/nfs-idmapd.service.orig nfs-utils-1.3.0/systemd/nfs-idmapd.service
4f2874
--- nfs-utils-1.3.0/systemd/nfs-idmapd.service.orig	2014-03-25 11:12:07.000000000 -0400
4f2874
+++ nfs-utils-1.3.0/systemd/nfs-idmapd.service	2015-01-15 08:04:55.291478000 -0500
4f2874
@@ -1,7 +1,7 @@
4f2874
 [Unit]
4f2874
 Description=NFSv4 ID-name mapping service
4f2874
 
4f2874
-PartOf=nfs-utils.service
4f2874
+BindsTo=nfs-server.service
4f2874
 
4f2874
 Wants=nfs-config.service
4f2874
 After=nfs-config.service
4f2874
diff -up nfs-utils-1.3.0/systemd/nfs-mountd.service.orig nfs-utils-1.3.0/systemd/nfs-mountd.service
4f2874
--- nfs-utils-1.3.0/systemd/nfs-mountd.service.orig	2014-03-25 11:12:07.000000000 -0400
4f2874
+++ nfs-utils-1.3.0/systemd/nfs-mountd.service	2015-01-15 08:04:55.300477000 -0500
4f2874
@@ -3,8 +3,7 @@ Description=NFS Mount Daemon
4f2874
 Requires=proc-fs-nfsd.mount
4f2874
 After=proc-fs-nfsd.mount
4f2874
 After=network.target
4f2874
-PartOf=nfs-server.service
4f2874
-PartOf=nfs-utils.service
4f2874
+BindsTo=nfs-server.service
4f2874
 
4f2874
 Wants=nfs-config.service
4f2874
 After=nfs-config.service
4f2874
diff -up nfs-utils-1.3.0/systemd/rpc-statd-notify.service.orig nfs-utils-1.3.0/systemd/rpc-statd-notify.service
4f2874
--- nfs-utils-1.3.0/systemd/rpc-statd-notify.service.orig	2014-03-25 11:12:07.000000000 -0400
4f2874
+++ nfs-utils-1.3.0/systemd/rpc-statd-notify.service	2015-01-15 08:06:17.251900000 -0500
4f2874
@@ -14,6 +14,5 @@ After=nfs-config.service
4f2874
 
4f2874
 [Service]
4f2874
 EnvironmentFile=-/run/sysconfig/nfs-utils
4f2874
-Type=oneshot
4f2874
-RemainAfterExit=yes
4f2874
-ExecStart=-/usr/sbin/sm-notify -d $SMNOTIFYARGS
4f2874
+Type=forking
4f2874
+ExecStart=-/usr/sbin/sm-notify $SMNOTIFYARGS
4f2874
diff -up nfs-utils-1.3.0/utils/statd/start-statd.orig nfs-utils-1.3.0/utils/statd/start-statd
4f2874
--- nfs-utils-1.3.0/utils/statd/start-statd.orig	2015-01-15 08:03:24.456789000 -0500
4f2874
+++ nfs-utils-1.3.0/utils/statd/start-statd	2015-01-15 08:05:34.612638000 -0500
4f2874
@@ -5,9 +5,12 @@
4f2874
 # It should run statd with whatever flags are apropriate for this
4f2874
 # site.
4f2874
 PATH="/sbin:/usr/sbin:/bin:/usr/bin"
4f2874
-if systemctl start rpc-statd.service
4f2874
-then :
4f2874
-else
4f2874
-    exec rpc.statd --no-notify
4f2874
+
4f2874
+# First try systemd if it's installed.
4f2874
+if [ -d /run/systemd/system ]; then
4f2874
+	# Quit only if the call worked.
4f2874
+	systemctl start rpc-statd.service && exit
4f2874
 fi
4f2874
 
4f2874
+# Fall back to launching it ourselves.
4f2874
+exec rpc.statd --no-notify