summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Client/Tools')
-rw-r--r--src/lib/Client/Tools/Upstart.py12
-rw-r--r--src/lib/Client/Tools/debsums.py11
2 files changed, 19 insertions, 4 deletions
diff --git a/src/lib/Client/Tools/Upstart.py b/src/lib/Client/Tools/Upstart.py
index a3da5b514..43a51fd79 100644
--- a/src/lib/Client/Tools/Upstart.py
+++ b/src/lib/Client/Tools/Upstart.py
@@ -32,13 +32,17 @@ class Upstart(Bcfg2.Client.Tools.SvcTool):
output = self.cmd.run('/usr/sbin/service %s status' % \
entry.get('name'))[1][0]
if output.split(' ')[1].split('/')[1].startswith('running'):
- status = True
+ entry.set('current_status', 'on')
if entry.get('status') == 'off':
- entry.set('current_status', 'on')
+ status = False
+ else:
+ status = True
else:
- status = False
+ entry.set('current_status', 'off')
if entry.get('status') == 'on':
- entry.set('current_status', 'off')
+ status = False
+ else:
+ status = True
return status
diff --git a/src/lib/Client/Tools/debsums.py b/src/lib/Client/Tools/debsums.py
new file mode 100644
index 000000000..bcc25d5a7
--- /dev/null
+++ b/src/lib/Client/Tools/debsums.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+"""
+ This provides bcfg2 support for debsums
+"""
+__revision__ = '$Revision$'
+
+import apt.cache
+import os
+import Bcfg2.Client.Tools
+
+