These are a number of ad-hoc things I. The nfs-utils_env.sh for SUSE
is primarily presented as an example. I'm happy for it to get
applied, but I'm happy if it isn't applied too.
Thanks,
NeilBrown
---
Neil Brown (6):
systemd units: remove reference to nfs-server.target from nfs-server.service.
systemd units: create nfs-config.service as single location to process config.
systemd: add nfs-utils_env.sh for SUSE.
systemd: remove @localstatedir@ marking.
systemd: nfs-client needs rpc-svcgssd too.
systemd: add PIDFile directives where appropriate.
systemd/README | 3 +-
systemd/SUSE-nfs-utils_env.sh | 62 ++++++++++++++++++++++++++++++++++++++
systemd/nfs-blkmap.service | 1 +
systemd/nfs-client.target | 5 ++-
systemd/nfs-config.service | 7 ++++
systemd/nfs-idmapd.service | 5 ++-
systemd/nfs-mountd.service | 5 ++-
systemd/nfs-server.service | 5 ++-
systemd/rpc-gssd.service | 4 ++
systemd/rpc-statd-notify.service | 5 ++-
systemd/rpc-statd.service | 6 ++--
systemd/rpc-svcgssd.service | 7 ++--
12 files changed, 97 insertions(+), 18 deletions(-)
create mode 100644 systemd/SUSE-nfs-utils_env.sh
create mode 100644 systemd/nfs-config.service
--
Signature
This script provides the required translation for
sysconfig variables understood by init.d script on openSUSE.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/SUSE-nfs-utils_env.sh | 62 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
create mode 100644 systemd/SUSE-nfs-utils_env.sh
diff --git a/systemd/SUSE-nfs-utils_env.sh b/systemd/SUSE-nfs-utils_env.sh
new file mode 100644
index 000000000000..8d6d94ed29e5
--- /dev/null
+++ b/systemd/SUSE-nfs-utils_env.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+# extract configuration from /etc/sysconfig/nfs-utils and write
+# environment to /run/sysconfig/nfs-utils to be used by systemd unit
+# files.
+# This script expect configuration as used by openSUSE-13.1 and later
+#
+
+nfs_config=/etc/sysconfig/nfs
+if test -r $nfs_config; then
+ . $nfs_config
+fi
+
+pipefs=
+if [ -n "$RPC_PIPEFS_DIR" -a "$RPC_PIPEFS_DIR" != "/var/lib/nfs/rpc_pipefs" ]; then
+ pipefs="-p /var/lib/nfs/rpc_pipefs"
+fi
+
+mountdport=
+if [ -n "$MOUNTD_PORT" ]; then
+ mountdport="-p $MOUNTD_PORT"
+fi
+
+case $NFS_GSSD_AVOID_DNS in
+ [Nn]*) ignore_dns=-D ;;
+ [Yy]*) ignore_dns= ;;
+ * ) ignore_dns=-D
+esac
+
+version_params=
+if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
+ version_params="--no-nfs-version 2 --no-nfs-version 3"
+fi
+if [ "$NFS4_SUPPORT" != "yes" ]; then
+ version_params="--no-nfs-version 4"
+fi
+if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then
+ version_params="$VERSION_PARAMS --nfs-version 4 --nfs-version 4.$NFS4_SERVER_MINOR_VERSION"
+fi
+
+if [ "$USE_KERNEL_NFSD_NUMBER" -gt 0 ]; then
+ threads=$USE_KERNEL_NFSD_NUMBER
+else
+ threads=3
+fi
+
+case $NFS_GSSD_AVOID_DNS in
+ [Nn]*) ignore_dns=-D ;;
+ [Yy]*) ignore_dns= ;;
+ * ) ignore_dns=-D
+esac
+
+mkdir -p /run/sysconfig
+{
+echo "RPCIDMAPDARGS=$pipefs"
+echo "RPCMOUNTDARGS=$mountdport $MOUNTD_OPTIONS $version_parms"
+echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $threads"
+echo "GSSDARGS=$ignore_dns $GSSD_OPTIONS $pipefs"
+echo "SMNOTIFYARGS=$SM_NOTIFY_OPTIONS"
+echo "STATDARGS=$STATD_OPTIONS"
+echo "SVCGSSDARGS=$SVCGSSD_OPTIONS"
+} > /run/sysconfig/nfs-utils
This isn't used so currently is inconvenient.
Once we decide how to handle this sort of thing we can apply
the change uniformly.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/rpc-svcgssd.service | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/systemd/rpc-svcgssd.service b/systemd/rpc-svcgssd.service
index 32b786ec5c7d..f7424b0b1085 100644
--- a/systemd/rpc-svcgssd.service
+++ b/systemd/rpc-svcgssd.service
@@ -6,7 +6,7 @@ PartOf=nfs-server.service
PartOf=nfs-utils.service
After=gssproxy.service
-ConditionPathExists=|!@localstatedir@/run/gssproxy.pid
+ConditionPathExists=|!/run/gssproxy.pid
ConditionPathExists=|!/proc/net/rpc/use-gss-proxy
ConditionPathExists=/etc/krb5.keytab
Instead of processing the config information into command lines every
time it might be needed, do it once in a separate service that other
services can Want.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/README | 3 +--
systemd/nfs-config.service | 7 +++++++
systemd/nfs-idmapd.service | 5 +++--
systemd/nfs-mountd.service | 5 +++--
systemd/nfs-server.service | 4 +++-
systemd/rpc-gssd.service | 4 +++-
systemd/rpc-statd-notify.service | 5 +++--
systemd/rpc-statd.service | 5 +++--
systemd/rpc-svcgssd.service | 5 +++--
9 files changed, 29 insertions(+), 14 deletions(-)
create mode 100644 systemd/nfs-config.service
diff --git a/systemd/README b/systemd/README
index 8359530098f4..a2a5f0634726 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 000000000000..4cf2ecc76e4a
--- /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 7d0dd84d8a44..11895e234438 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 90746a854b40..7ccc0f72012d 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 5779fd39ed34..2fa7387e1cb9 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 375792804247..d4a381904de4 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 7742ac8c5d9a..6b13b323e758 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 3f6cda16accd..c5795fd68f96 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 6bd45884d991..32b786ec5c7d 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
Only two of our daemons write out pid files.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/nfs-blkmap.service | 1 +
systemd/rpc-statd.service | 1 +
2 files changed, 2 insertions(+)
diff --git a/systemd/nfs-blkmap.service b/systemd/nfs-blkmap.service
index 4b74e9f61454..68cc9e968e65 100644
--- a/systemd/nfs-blkmap.service
+++ b/systemd/nfs-blkmap.service
@@ -12,4 +12,5 @@ PartOf=nfs-utils.service
[Service]
Type=forking
+PIDFile=/var/run/blkmapd.pid
ExecStart=/usr/sbin/blkmapd
diff --git a/systemd/rpc-statd.service b/systemd/rpc-statd.service
index c5795fd68f96..14604d783ddf 100644
--- a/systemd/rpc-statd.service
+++ b/systemd/rpc-statd.service
@@ -13,4 +13,5 @@ After=nfs-config.service
[Service]
EnvironmentFile=-/run/sysconfig/nfs-utils
Type=forking
+PIDFile=/var/run/rpc.statd.pid
ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS
For NFSv4.0 callbacks, the server needs the client code and
the client needs the server code.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/nfs-client.target | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/systemd/nfs-client.target b/systemd/nfs-client.target
index fa591354abf3..f3c09e76a0f7 100644
--- a/systemd/nfs-client.target
+++ b/systemd/nfs-client.target
@@ -5,8 +5,9 @@ Wants=remote-fs-pre.target
# Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to
# start that on demand if needed.
-Wants=rpc-gssd.service nfs-blkmap.service rpc-statd-notify.service
-Before=rpc-gssd.service nfs-blkmap.service
+Wants=rpc-gssd.service rpc-svcgssd.service
+Wants=nfs-blkmap.service rpc-statd-notify.service
+Before=rpc-gssd.service rpc-svcgssd.service nfs-blkmap.service
[Install]
WantedBy=multi-user.target
This line was somehow missed in a recent patch. nfs-server.target
doesn't exists, so nothing can be part of it.
Signed-off-by: NeilBrown <[email protected]>
---
systemd/nfs-server.service | 1 -
1 file changed, 1 deletion(-)
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
index 26df65662428..5779fd39ed34 100644
--- a/systemd/nfs-server.service
+++ b/systemd/nfs-server.service
@@ -1,7 +1,6 @@
[Unit]
Description=NFS server and services
Requires= network.target proc-fs-nfsd.mount rpcbind.target
-PartOf=nfs-server.target
Requires= nfs-mountd.service
Wants=rpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd.service
Wants=rpc-statd-notify.service
On 02/20/2014 01:55 AM, Neil Brown wrote:
> This script provides the required translation for
> sysconfig variables understood by init.d script on openSUSE.
>
> Signed-off-by: NeilBrown <[email protected]>
> ---
> systemd/SUSE-nfs-utils_env.sh | 62 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
> create mode 100644 systemd/SUSE-nfs-utils_env.sh
I was thinking about this one too... Yeah, I know.. I need life!! ;-)
Do we really want distro specific files like this in the upstream repo?
Its more of a maintenance thing than anything... If something distro
specific changes, do we really need to send the change upstream and
does upstream really care?
steved.
>
> diff --git a/systemd/SUSE-nfs-utils_env.sh b/systemd/SUSE-nfs-utils_env.sh
> new file mode 100644
> index 000000000000..8d6d94ed29e5
> --- /dev/null
> +++ b/systemd/SUSE-nfs-utils_env.sh
> @@ -0,0 +1,62 @@
> +#!/bin/sh
> +
> +# extract configuration from /etc/sysconfig/nfs-utils and write
> +# environment to /run/sysconfig/nfs-utils to be used by systemd unit
> +# files.
> +# This script expect configuration as used by openSUSE-13.1 and later
> +#
> +
> +nfs_config=/etc/sysconfig/nfs
> +if test -r $nfs_config; then
> + . $nfs_config
> +fi
> +
> +pipefs=
> +if [ -n "$RPC_PIPEFS_DIR" -a "$RPC_PIPEFS_DIR" != "/var/lib/nfs/rpc_pipefs" ]; then
> + pipefs="-p /var/lib/nfs/rpc_pipefs"
> +fi
> +
> +mountdport=
> +if [ -n "$MOUNTD_PORT" ]; then
> + mountdport="-p $MOUNTD_PORT"
> +fi
> +
> +case $NFS_GSSD_AVOID_DNS in
> + [Nn]*) ignore_dns=-D ;;
> + [Yy]*) ignore_dns= ;;
> + * ) ignore_dns=-D
> +esac
> +
> +version_params=
> +if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
> + version_params="--no-nfs-version 2 --no-nfs-version 3"
> +fi
> +if [ "$NFS4_SUPPORT" != "yes" ]; then
> + version_params="--no-nfs-version 4"
> +fi
> +if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then
> + version_params="$VERSION_PARAMS --nfs-version 4 --nfs-version 4.$NFS4_SERVER_MINOR_VERSION"
> +fi
> +
> +if [ "$USE_KERNEL_NFSD_NUMBER" -gt 0 ]; then
> + threads=$USE_KERNEL_NFSD_NUMBER
> +else
> + threads=3
> +fi
> +
> +case $NFS_GSSD_AVOID_DNS in
> + [Nn]*) ignore_dns=-D ;;
> + [Yy]*) ignore_dns= ;;
> + * ) ignore_dns=-D
> +esac
> +
> +mkdir -p /run/sysconfig
> +{
> +echo "RPCIDMAPDARGS=$pipefs"
> +echo "RPCMOUNTDARGS=$mountdport $MOUNTD_OPTIONS $version_parms"
> +echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $threads"
> +echo "GSSDARGS=$ignore_dns $GSSD_OPTIONS $pipefs"
> +echo "SMNOTIFYARGS=$SM_NOTIFY_OPTIONS"
> +echo "STATDARGS=$STATD_OPTIONS"
> +echo "SVCGSSDARGS=$SVCGSSD_OPTIONS"
> +} > /run/sysconfig/nfs-utils
>
>
On 03/23/2014 08:00 PM, NeilBrown wrote:
> On Sat, 22 Mar 2014 17:24:59 -0400 Steve Dickson <[email protected]> wrote:
>
>> Hello,
>>
>> I finally got around to playing with these....
>> Here is what I found.
>>
>> On 02/20/2014 01:55 AM, Neil Brown wrote:
>>> Instead of processing the config information into command lines every
>>> time it might be needed, do it once in a separate service that other
>>> services can Want.
>>>
>>> Signed-off-by: NeilBrown <[email protected]>
>>> ---
>>> systemd/README | 3 +--
>>> systemd/nfs-config.service | 7 +++++++
>>> systemd/nfs-idmapd.service | 5 +++--
>>> systemd/nfs-mountd.service | 5 +++--
>>> systemd/nfs-server.service | 4 +++-
>>> systemd/rpc-gssd.service | 4 +++-
>>> systemd/rpc-statd-notify.service | 5 +++--
>>> systemd/rpc-statd.service | 5 +++--
>>> systemd/rpc-svcgssd.service | 5 +++--
>>> 9 files changed, 29 insertions(+), 14 deletions(-)
>>> create mode 100644 systemd/nfs-config.service
>>>
>>> diff --git a/systemd/README b/systemd/README
>>> index 8359530098f4..a2a5f0634726 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 000000000000..4cf2ecc76e4a
>>> --- /dev/null
>>> +++ b/systemd/nfs-config.service
>>> @@ -0,0 +1,7 @@
>>> +[Unit]
>>> +Description=Preprocess NFS configuration
>>> +
>>> +[Service]
>>> +type=oneshot
>> This is a typo... It should be Type=oneshot
>
> Groan. Thanks.
>
>
>>
>>> +RemainAfterExit=yes
>>> +ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
>> Can this be moved from /usr/lib/systemd/scripts to /usr/lib/systemd/system
>> since the scripts directory does not exit and I don't think we
>> want to be creating directories under /usr/lib/systemd/
>
> Interesting question.
> I don't think it really belongs in /usr/lib/systemd/system, though as it has
> a ".sh" extension systemd isn't going to confuse it for a unit file.
> However systemd developers seem to have the attitude to just "do it right,
> even if that means doing something new", and I think a scripts directory is
> "right", even though it is currently "new".
>
> Though it isn't that new - a google for
> "/usr/lib/systemd/scripts"
> (in quotes) claim 44000 hits, and those that I looked at are genuine (though
> probably not all really unique).
I got 44300... ;-)
>
> If we agree that having shell scripts is appropriate we should probably raise
> the preferred location on the systemd-devel mailing list.
I was just concern with creating the directory... but it appears to be
the right ting to do...
>
>
>>
>> Finally, Its a bit confusing on how to get the new /run/sysconfig/nfs-utils
>> created. systemctl start nfs-config does not do it but
>> systemctl restart nfs-config.
>>
>> Doesn't this also mean every time /etc/sysconfig/nfs is edited
>> a systemctl restart nfs-config has to be done to update the
>> new /run/sysconfig/nfs-utils and then restart the server
>> they are reconfigured? Or am I missing something?
>
> Fair comment.... Maybe we should use a 'path' unit to run the config-parser
> every time /etc/sysconfig/nfs changes.
> I'll see if I can make that work.
That would be good... thanks!
steved.
>
> Thanks,
> NeilBrown
>
>
>
>
>
>>
>> If I'm not it seems a bit overly complicated and its not
>> appeared to be documented anywhere...
>>
>> steved.
>>
>>> diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
>>> index 7d0dd84d8a44..11895e234438 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 90746a854b40..7ccc0f72012d 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 5779fd39ed34..2fa7387e1cb9 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 375792804247..d4a381904de4 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 7742ac8c5d9a..6b13b323e758 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 3f6cda16accd..c5795fd68f96 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 6bd45884d991..32b786ec5c7d 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
>>>
>>>
>
On Sun, 23 Mar 2014 15:14:44 -0400 Steve Dickson <[email protected]> wrote:
>
>
> On 02/20/2014 01:55 AM, Neil Brown wrote:
> > This script provides the required translation for
> > sysconfig variables understood by init.d script on openSUSE.
> >
> > Signed-off-by: NeilBrown <[email protected]>
> > ---
> > systemd/SUSE-nfs-utils_env.sh | 62 +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 62 insertions(+)
> > create mode 100644 systemd/SUSE-nfs-utils_env.sh
> I was thinking about this one too... Yeah, I know.. I need life!! ;-)
>
> Do we really want distro specific files like this in the upstream repo?
> Its more of a maintenance thing than anything... If something distro
> specific changes, do we really need to send the change upstream and
> does upstream really care?
Probably not. I mainly added that as an example as there seems to be some
confusion over how I imagined these things working.
I'm quite happy to not have this upstream (I might even prefer it).
Thanks,
NeilBrown
>
> steved.
> >
> > diff --git a/systemd/SUSE-nfs-utils_env.sh b/systemd/SUSE-nfs-utils_env.sh
> > new file mode 100644
> > index 000000000000..8d6d94ed29e5
> > --- /dev/null
> > +++ b/systemd/SUSE-nfs-utils_env.sh
> > @@ -0,0 +1,62 @@
> > +#!/bin/sh
> > +
> > +# extract configuration from /etc/sysconfig/nfs-utils and write
> > +# environment to /run/sysconfig/nfs-utils to be used by systemd unit
> > +# files.
> > +# This script expect configuration as used by openSUSE-13.1 and later
> > +#
> > +
> > +nfs_config=/etc/sysconfig/nfs
> > +if test -r $nfs_config; then
> > + . $nfs_config
> > +fi
> > +
> > +pipefs=
> > +if [ -n "$RPC_PIPEFS_DIR" -a "$RPC_PIPEFS_DIR" != "/var/lib/nfs/rpc_pipefs" ]; then
> > + pipefs="-p /var/lib/nfs/rpc_pipefs"
> > +fi
> > +
> > +mountdport=
> > +if [ -n "$MOUNTD_PORT" ]; then
> > + mountdport="-p $MOUNTD_PORT"
> > +fi
> > +
> > +case $NFS_GSSD_AVOID_DNS in
> > + [Nn]*) ignore_dns=-D ;;
> > + [Yy]*) ignore_dns= ;;
> > + * ) ignore_dns=-D
> > +esac
> > +
> > +version_params=
> > +if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then
> > + version_params="--no-nfs-version 2 --no-nfs-version 3"
> > +fi
> > +if [ "$NFS4_SUPPORT" != "yes" ]; then
> > + version_params="--no-nfs-version 4"
> > +fi
> > +if [ "$NFS4_SERVER_MINOR_VERSION" != "0" ]; then
> > + version_params="$VERSION_PARAMS --nfs-version 4 --nfs-version 4.$NFS4_SERVER_MINOR_VERSION"
> > +fi
> > +
> > +if [ "$USE_KERNEL_NFSD_NUMBER" -gt 0 ]; then
> > + threads=$USE_KERNEL_NFSD_NUMBER
> > +else
> > + threads=3
> > +fi
> > +
> > +case $NFS_GSSD_AVOID_DNS in
> > + [Nn]*) ignore_dns=-D ;;
> > + [Yy]*) ignore_dns= ;;
> > + * ) ignore_dns=-D
> > +esac
> > +
> > +mkdir -p /run/sysconfig
> > +{
> > +echo "RPCIDMAPDARGS=$pipefs"
> > +echo "RPCMOUNTDARGS=$mountdport $MOUNTD_OPTIONS $version_parms"
> > +echo "RPCNFSDARGS=$NFSD_OPTIONS $version_params $threads"
> > +echo "GSSDARGS=$ignore_dns $GSSD_OPTIONS $pipefs"
> > +echo "SMNOTIFYARGS=$SM_NOTIFY_OPTIONS"
> > +echo "STATDARGS=$STATD_OPTIONS"
> > +echo "SVCGSSDARGS=$SVCGSSD_OPTIONS"
> > +} > /run/sysconfig/nfs-utils
> >
> >
Hello,
I finally got around to playing with these....
Here is what I found.
On 02/20/2014 01:55 AM, Neil Brown wrote:
> Instead of processing the config information into command lines every
> time it might be needed, do it once in a separate service that other
> services can Want.
>
> Signed-off-by: NeilBrown <[email protected]>
> ---
> systemd/README | 3 +--
> systemd/nfs-config.service | 7 +++++++
> systemd/nfs-idmapd.service | 5 +++--
> systemd/nfs-mountd.service | 5 +++--
> systemd/nfs-server.service | 4 +++-
> systemd/rpc-gssd.service | 4 +++-
> systemd/rpc-statd-notify.service | 5 +++--
> systemd/rpc-statd.service | 5 +++--
> systemd/rpc-svcgssd.service | 5 +++--
> 9 files changed, 29 insertions(+), 14 deletions(-)
> create mode 100644 systemd/nfs-config.service
>
> diff --git a/systemd/README b/systemd/README
> index 8359530098f4..a2a5f0634726 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 000000000000..4cf2ecc76e4a
> --- /dev/null
> +++ b/systemd/nfs-config.service
> @@ -0,0 +1,7 @@
> +[Unit]
> +Description=Preprocess NFS configuration
> +
> +[Service]
> +type=oneshot
This is a typo... It should be Type=oneshot
> +RemainAfterExit=yes
> +ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
Can this be moved from /usr/lib/systemd/scripts to /usr/lib/systemd/system
since the scripts directory does not exit and I don't think we
want to be creating directories under /usr/lib/systemd/
Finally, Its a bit confusing on how to get the new /run/sysconfig/nfs-utils
created. systemctl start nfs-config does not do it but
systemctl restart nfs-config.
Doesn't this also mean every time /etc/sysconfig/nfs is edited
a systemctl restart nfs-config has to be done to update the
new /run/sysconfig/nfs-utils and then restart the server
they are reconfigured? Or am I missing something?
If I'm not it seems a bit overly complicated and its not
appeared to be documented anywhere...
steved.
> diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
> index 7d0dd84d8a44..11895e234438 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 90746a854b40..7ccc0f72012d 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 5779fd39ed34..2fa7387e1cb9 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 375792804247..d4a381904de4 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 7742ac8c5d9a..6b13b323e758 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 3f6cda16accd..c5795fd68f96 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 6bd45884d991..32b786ec5c7d 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
>
>
On 02/20/2014 01:55 AM, Neil Brown wrote:
> These are a number of ad-hoc things I. The nfs-utils_env.sh for SUSE
> is primarily presented as an example. I'm happy for it to get
> applied, but I'm happy if it isn't applied too.
>
> Thanks,
> NeilBrown
>
>
> ---
>
> Neil Brown (6):
> systemd units: remove reference to nfs-server.target from nfs-server.service.
> systemd units: create nfs-config.service as single location to process config.
Committed to both of test to the systemd branch, with typo fixed.
> systemd: add nfs-utils_env.sh for SUSE.
Did not commit this one.
> systemd: remove @localstatedir@ marking.
> systemd: nfs-client needs rpc-svcgssd too.
> systemd: add PIDFile directives where appropriate.
Committed these three to the systemd branch.
I'm planning on move these on the main branch very soon
they will be in the upcoming release.
steved.
>
>
> systemd/README | 3 +-
> systemd/SUSE-nfs-utils_env.sh | 62 ++++++++++++++++++++++++++++++++++++++
> systemd/nfs-blkmap.service | 1 +
> systemd/nfs-client.target | 5 ++-
> systemd/nfs-config.service | 7 ++++
> systemd/nfs-idmapd.service | 5 ++-
> systemd/nfs-mountd.service | 5 ++-
> systemd/nfs-server.service | 5 ++-
> systemd/rpc-gssd.service | 4 ++
> systemd/rpc-statd-notify.service | 5 ++-
> systemd/rpc-statd.service | 6 ++--
> systemd/rpc-svcgssd.service | 7 ++--
> 12 files changed, 97 insertions(+), 18 deletions(-)
> create mode 100644 systemd/SUSE-nfs-utils_env.sh
> create mode 100644 systemd/nfs-config.service
>
On Sat, 22 Mar 2014 17:24:59 -0400 Steve Dickson <[email protected]> wrote:
> Hello,
>
> I finally got around to playing with these....
> Here is what I found.
>
> On 02/20/2014 01:55 AM, Neil Brown wrote:
> > Instead of processing the config information into command lines every
> > time it might be needed, do it once in a separate service that other
> > services can Want.
> >
> > Signed-off-by: NeilBrown <[email protected]>
> > ---
> > systemd/README | 3 +--
> > systemd/nfs-config.service | 7 +++++++
> > systemd/nfs-idmapd.service | 5 +++--
> > systemd/nfs-mountd.service | 5 +++--
> > systemd/nfs-server.service | 4 +++-
> > systemd/rpc-gssd.service | 4 +++-
> > systemd/rpc-statd-notify.service | 5 +++--
> > systemd/rpc-statd.service | 5 +++--
> > systemd/rpc-svcgssd.service | 5 +++--
> > 9 files changed, 29 insertions(+), 14 deletions(-)
> > create mode 100644 systemd/nfs-config.service
> >
> > diff --git a/systemd/README b/systemd/README
> > index 8359530098f4..a2a5f0634726 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 000000000000..4cf2ecc76e4a
> > --- /dev/null
> > +++ b/systemd/nfs-config.service
> > @@ -0,0 +1,7 @@
> > +[Unit]
> > +Description=Preprocess NFS configuration
> > +
> > +[Service]
> > +type=oneshot
> This is a typo... It should be Type=oneshot
Groan. Thanks.
>
> > +RemainAfterExit=yes
> > +ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
> Can this be moved from /usr/lib/systemd/scripts to /usr/lib/systemd/system
> since the scripts directory does not exit and I don't think we
> want to be creating directories under /usr/lib/systemd/
Interesting question.
I don't think it really belongs in /usr/lib/systemd/system, though as it has
a ".sh" extension systemd isn't going to confuse it for a unit file.
However systemd developers seem to have the attitude to just "do it right,
even if that means doing something new", and I think a scripts directory is
"right", even though it is currently "new".
Though it isn't that new - a google for
"/usr/lib/systemd/scripts"
(in quotes) claim 44000 hits, and those that I looked at are genuine (though
probably not all really unique).
If we agree that having shell scripts is appropriate we should probably raise
the preferred location on the systemd-devel mailing list.
>
> Finally, Its a bit confusing on how to get the new /run/sysconfig/nfs-utils
> created. systemctl start nfs-config does not do it but
> systemctl restart nfs-config.
>
> Doesn't this also mean every time /etc/sysconfig/nfs is edited
> a systemctl restart nfs-config has to be done to update the
> new /run/sysconfig/nfs-utils and then restart the server
> they are reconfigured? Or am I missing something?
Fair comment.... Maybe we should use a 'path' unit to run the config-parser
every time /etc/sysconfig/nfs changes.
I'll see if I can make that work.
Thanks,
NeilBrown
>
> If I'm not it seems a bit overly complicated and its not
> appeared to be documented anywhere...
>
> steved.
>
> > diff --git a/systemd/nfs-idmapd.service b/systemd/nfs-idmapd.service
> > index 7d0dd84d8a44..11895e234438 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 90746a854b40..7ccc0f72012d 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 5779fd39ed34..2fa7387e1cb9 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 375792804247..d4a381904de4 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 7742ac8c5d9a..6b13b323e758 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 3f6cda16accd..c5795fd68f96 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 6bd45884d991..32b786ec5c7d 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
> >
> >