when start/stopping services on f>=14, need a patch that was originally available...
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 25 May 2018 10:30:19 +0000 (12:30 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 25 May 2018 10:30:19 +0000 (12:30 +0200)
system/TestPlc.py

index 4e90d13..b6f211f 100644 (file)
@@ -798,8 +798,13 @@ class TestPlc:
         return self.start_stop_service(service, 'stop')
 
     def start_stop_service(self, service, start_or_stop):
-        "utility to start/stop a service with the special trick for f14"
-        if self.options.fcdistro != 'f14':
+        "utility to start/stop a service with the special trick starting with f14"
+        has_systemctl = False
+        if self.options.fcdistro[0] == 'f':
+            number = int(self.options.fcdistro[1:])
+            if number >= 14:
+                has_systemctl = True
+        if not has_systemctl:
             return self.run_in_guest("service {} {}".format(service, start_or_stop)) == 0
         else:
             # patch /sbin/service so it does not reset environment