Blame SOURCES/0015-compat-do-not-stop-rpcbind-only-start-it.patch

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