File: 0010-Fix-package-management.patch

package info (click to toggle)
crmsh 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,980 kB
  • sloc: python: 50,399; sh: 1,207; makefile: 255; xml: 243; exp: 234; awk: 22
file content (33 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Use dpkg and apt for package management
Author: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Last-Update: 2019-01-12
--- a/utils/crm_init.py
+++ b/utils/crm_init.py
@@ -25,12 +25,12 @@
 def service_info(service):
     "Returns information about a given service"
     active, enabled = 'unknown', 'unknown'
-    rc, out, err = crm_script.call(["/usr/bin/systemctl", "is-enabled", "%s.service" % (service)])
+    rc, out, err = crm_script.call(["/bin/systemctl", "is-enabled", "%s.service" % (service)])
     if rc in (0, 1, 3) and out:
         enabled = out.strip()
     else:
         return {'name': service, 'error': err.strip()}
-    rc, out, err = crm_script.call(["/usr/bin/systemctl", "is-active", "%s.service" % (service)])
+    rc, out, err = crm_script.call(["/bin/systemctl", "is-active", "%s.service" % (service)])
     if rc in (0, 1, 3) and out:
         active = out.strip()
     else:
--- a/utils/crm_script.py
+++ b/utils/crm_script.py
@@ -133,8 +133,8 @@
 
 def service(name, action):
     if action.startswith('is-'):
-        return call(['/usr/bin/systemctl', action, name + '.service'])
-    return sudo_call(['/usr/bin/systemctl', action, name + '.service'])
+        return call(['/bin/systemctl', action, name + '.service'])
+    return sudo_call(['/bin/systemctl', action, name + '.service'])
 
 
 def package(name, state):