diff mbox

[nfs-utils] Add RemainAfterExit to two services.

Message ID 877ew90z6j.fsf@notabene.neil.brown.name (mailing list archive)
State New, archived
Headers show

Commit Message

NeilBrown Oct. 6, 2017, 2:48 a.m. UTC
Both auth-rpcgss-module and rpc-statd-notify only
ever need to be run once - the effect they have
is permanent.
We can give this information to systemd by setting
RemainAfterExit=yes
This avoids the minor cost of running them a second time
if something "Wants" either service after it was first run,
(e.g. both client and server startup can Want these),
and avoids systemd complaining that it restarts to fast
if multiple Wants happen at nearly the same time.

Signed-off-by: NeilBrown <neilb@suse.com>
---
 systemd/auth-rpcgss-module.service | 1 +
 systemd/rpc-statd-notify.service   | 1 +
 2 files changed, 2 insertions(+)

Comments

Steve Dickson Oct. 12, 2017, 2:20 p.m. UTC | #1
On 10/05/2017 10:48 PM, NeilBrown wrote:
> 
> Both auth-rpcgss-module and rpc-statd-notify only
> ever need to be run once - the effect they have
> is permanent.
> We can give this information to systemd by setting
> RemainAfterExit=yes
> This avoids the minor cost of running them a second time
> if something "Wants" either service after it was first run,
> (e.g. both client and server startup can Want these),
> and avoids systemd complaining that it restarts to fast
> if multiple Wants happen at nearly the same time.
> 
> Signed-off-by: NeilBrown <neilb@suse.com>
Committed...

steved.
> ---
>  systemd/auth-rpcgss-module.service | 1 +
>  systemd/rpc-statd-notify.service   | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service
> index 5241f7b5d58e..4548283377d0 100644
> --- a/systemd/auth-rpcgss-module.service
> +++ b/systemd/auth-rpcgss-module.service
> @@ -14,3 +14,4 @@ ConditionPathExists=/etc/krb5.keytab
>  [Service]
>  Type=oneshot
>  ExecStart=/sbin/modprobe -q auth_rpcgss
> +RemainAfterExit=yes
> diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
> index 687fe31140c0..aad4c0d29efe 100644
> --- a/systemd/rpc-statd-notify.service
> +++ b/systemd/rpc-statd-notify.service
> @@ -13,3 +13,4 @@ PartOf=nfs-utils.service
>  [Service]
>  Type=forking
>  ExecStart=-/usr/sbin/sm-notify
> +RemainAfterExit=yes
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/systemd/auth-rpcgss-module.service b/systemd/auth-rpcgss-module.service
index 5241f7b5d58e..4548283377d0 100644
--- a/systemd/auth-rpcgss-module.service
+++ b/systemd/auth-rpcgss-module.service
@@ -14,3 +14,4 @@  ConditionPathExists=/etc/krb5.keytab
 [Service]
 Type=oneshot
 ExecStart=/sbin/modprobe -q auth_rpcgss
+RemainAfterExit=yes
diff --git a/systemd/rpc-statd-notify.service b/systemd/rpc-statd-notify.service
index 687fe31140c0..aad4c0d29efe 100644
--- a/systemd/rpc-statd-notify.service
+++ b/systemd/rpc-statd-notify.service
@@ -13,3 +13,4 @@  PartOf=nfs-utils.service
 [Service]
 Type=forking
 ExecStart=-/usr/sbin/sm-notify
+RemainAfterExit=yes