44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
|
From c8456ad275ce96648927e9146de23ee73e334f09 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
||
|
Date: Tue, 25 Sep 2018 10:58:50 +0200
|
||
|
Subject: [PATCH 15/16] compat: do not stop rpcbind, only start it
|
||
|
|
||
|
Stopping rpcbind on a nis server will also stop ypserv as it depends
|
||
|
on rpcbind. There is no need to actually restart this service so we
|
||
|
only make sure that it is up and running.
|
||
|
|
||
|
Resolves:
|
||
|
https://github.com/pbrezina/authselect/issues/100
|
||
|
---
|
||
|
src/compat/authcompat.py.in.in | 7 ++++---
|
||
|
1 file changed, 4 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/src/compat/authcompat.py.in.in b/src/compat/authcompat.py.in.in
|
||
|
index 532227b69f3bb3d124078915bd846009bee7df7a..0be644222a44185cb08ff696afad5adf05995093 100755
|
||
|
--- a/src/compat/authcompat.py.in.in
|
||
|
+++ b/src/compat/authcompat.py.in.in
|
||
|
@@ -80,8 +80,9 @@ class Service:
|
||
|
cmd = Command(Path.System("cmd-systemctl"), ["disable", self.name])
|
||
|
self.runsystemd(cmd, False, 1)
|
||
|
|
||
|
- def start(self):
|
||
|
- self.stop()
|
||
|
+ def start(self, Restart=True):
|
||
|
+ if Restart:
|
||
|
+ self.stop()
|
||
|
cmd = Command(Path.System("cmd-systemctl"), ["start", self.name])
|
||
|
self.runsystemd(cmd, True, 5)
|
||
|
|
||
|
@@ -404,7 +405,7 @@ class Configuration:
|
||
|
self.ypbind.enable()
|
||
|
|
||
|
if not nostart:
|
||
|
- self.rpcbind.start()
|
||
|
+ self.rpcbind.start(Restart=False)
|
||
|
self.ypbind.start()
|
||
|
|
||
|
def disableService(self, nostop):
|
||
|
--
|
||
|
2.17.1
|
||
|
|