Skip to contentSkip to conversation

systemd: ensure nfs-config service is re-run as needed.

PATCH In review NeilBrown 2 participants 2 messages Mar 16, 2016

Subsystems (2)
lore
Share & tools
lore

NeilBrown

author
#0 lore raw

PATCH 1/1 systemd: ensure nfs-config service is re-run as needed.

The nfs-config service translates distro-specific startup configuration into "environment" variable read and used by systemd unit files.

Currently it is only run once, so subsequent changes to the distro-specific files do not take effect when an nfs service is restarted.

If we change "RemainAfterExit=yes" to "RemainAfterExit=no" then the service will be restarted before any dependant service is started, so the environment file will always be up to date.

---
 systemd/nfs-config.service | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
systemd/nfs-config.service +5 -1
index 7f653058f424..e0a7f83314f5 100644
@@ -5,5 +5,9 @@ DefaultDependencies=no
 
 [Service]
 Type=oneshot
-RemainAfterExit=yes
+# This service needs to run any time any nfs service
+# is started, so changes to local config files get
+# incorporated.  Having "RemainAfterExit=no" (the default)
+# ensures this happens.
+RemainAfterExit=no
 ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh
Signature · 1 line
2.7.2
#1 lore raw
Quoted 9 lines · NeilBrown

The nfs-config service translates distro-specific startup configuration into "environment" variable read and used by systemd unit files.

Currently it is only run once, so subsequent changes to the distro-specific files do not take effect when an nfs service is restarted.

Quoted 6 lines

If we change "RemainAfterExit=yes" to "RemainAfterExit=no" then the service will be restarted before any dependant service is started, so the environment file will always be up to date.

Committed... Nice Work!!!

steved.

Quoted 20 lines
---
 systemd/nfs-config.service | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
systemd/nfs-config.service +5 -1
index 7f653058f424..e0a7f83314f5 100644
@@ -5,5 +5,9 @@ DefaultDependencies=no
 
 [Service]
 Type=oneshot
-RemainAfterExit=yes
+# This service needs to run any time any nfs service
+# is started, so changes to local config files get
+# incorporated.  Having "RemainAfterExit=no" (the default)
+# ensures this happens.
+RemainAfterExit=no
 ExecStart=/usr/lib/systemd/scripts/nfs-utils_env.sh