linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: Benjamin Coddington <bcodding@redhat.com>
Cc: Linux NFS mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH - nfs-utils] systemd: ensure nfs-config service is re-run as needed.
Date: Wed, 16 Mar 2016 12:34:24 +1100	[thread overview]
Message-ID: <87fuvrfbof.fsf@notabene.neil.brown.name> (raw)

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]


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.

Reported-and-tested-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
---
 systemd/nfs-config.service | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/systemd/nfs-config.service b/systemd/nfs-config.service
index 7f653058f424..e0a7f83314f5 100644
--- a/systemd/nfs-config.service
+++ b/systemd/nfs-config.service
@@ -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
-- 
2.7.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

             reply	other threads:[~2016-03-16  1:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16  1:34 NeilBrown [this message]
2016-03-16 18:23 ` [PATCH - nfs-utils] systemd: ensure nfs-config service is re-run as needed Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fuvrfbof.fsf@notabene.neil.brown.name \
    --to=neilb@suse.com \
    --cc=SteveD@redhat.com \
    --cc=bcodding@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).