summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--systemd/README3
-rw-r--r--systemd/nfs-config.service7
-rw-r--r--systemd/nfs-idmapd.service5
-rw-r--r--systemd/nfs-mountd.service5
-rw-r--r--systemd/nfs-server.service4
-rw-r--r--systemd/rpc-gssd.service4
-rw-r--r--systemd/rpc-statd-notify.service5
-rw-r--r--systemd/rpc-statd.service5
-rw-r--r--systemd/rpc-svcgssd.service5
9 files changed, 29 insertions, 14 deletions
diff --git a/systemd/README b/systemd/README
index 8359530..a2a5f06 100644
--- a/systemd/README
+++ b/systemd/README
@@ -56,8 +56,7 @@ Distro specific commandline configuration can be provided by
installing a script /usr/lib/systemd/scripts/nfs-utils_env.sh
This should write /run/sysconfig/nfs-utils based on configuration
information such as in /etc/sysconfig/nfs or /etc/defaults/nfs.
-It should write to a tmp file and rename to the target to
-avoid parallel units seeing incomplete copies of the file.
+It is run once by nfs-config.service.
rpc.gssd and rpc.svcgssd are assumed to be needed if /etc/krb5.keytab
is present.
diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service
new file mode 100644
index 0000000..64010e6
--- /dev/null
+++ b/systemd/nfs-config.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Preprocess NFS configuration
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
index 7d0dd84..11895e2 100644
--- a/systemd/nfs-idmapd.service
+++ b/systemd/nfs-idmapd.service
@@ -3,9 +3,10 @@ Description=NFSv4 ID-name mapping service
PartOf=nfs-utils.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
-
Type=forking
ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS
diff --git a/systemd/nfs-mountd.service b/systemd/nfs-mountd.service
index 90746a8..7ccc0f7 100644
--- a/systemd/nfs-mountd.service
+++ b/systemd/nfs-mountd.service
@@ -6,9 +6,10 @@ After=network.target
PartOf=nfs-server.service
PartOf=nfs-utils.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
-
Type=forking
ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDARGS
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index 5779fd3..2fa7387 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -10,9 +10,11 @@ After= nfs-idmapd.service rpc-statd.service
After= rpc-gssd.service rpc-svcgssd.service
Before= rpc-statd-notify.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
Type=oneshot
RemainAfterExit=yes
diff --git a/systemd/rpc-gssd.service b/systemd/rpc-gssd.service
index 3757928..d4a3819 100644
--- a/systemd/rpc-gssd.service
+++ b/systemd/rpc-gssd.service
@@ -9,9 +9,11 @@ ConditionPathExists=/etc/krb5.keytab
PartOf=nfs-utils.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
Type=forking
ExecStart=/usr/sbin/rpc.gssd $GSSDARGS
diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
index 7742ac8..6b13b32 100644
--- a/systemd/rpc-statd-notify.service
+++ b/systemd/rpc-statd-notify.service
@@ -9,10 +9,11 @@ After=nfs-server.service
PartOf=nfs-utils.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=/usr/lib/systemd/scritps/nfs-utils_env.sh
-
Type=oneshot
RemainAfterExit=yes
ExecStart=-/usr/sbin/sm-notify -d $SMNOTIFYARGS
diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
index 3f6cda1..c5795fd 100644
--- a/systemd/rpc-statd.service
+++ b/systemd/rpc-statd.service
@@ -7,9 +7,10 @@ After=network.target nss-lookup.target rpcbind.target
PartOf=nfs-utils.service
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
-
Type=forking
ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS
diff --git a/systemd/rpc-svcgssd.service b/systemd/rpc-svcgssd.service
index 6bd4588..32b786e 100644
--- a/systemd/rpc-svcgssd.service
+++ b/systemd/rpc-svcgssd.service
@@ -10,9 +10,10 @@ ConditionPathExists=|!@localstatedir@/run/gssproxy.pid
ConditionPathExists=|!/proc/net/rpc/use-gss-proxy
ConditionPathExists=/etc/krb5.keytab
+Wants=nfs-config.service
+After=nfs-config.service
+
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
-ExecStartPre=-/usr/lib/systemd/scritps/nfs-utils_env.sh
-
Type=forking
ExecStart=/usr/sbin/rpc.svcgssd $SVCGSSDARGS