diff options
author | Kamil Kisiel <kamil@kamilkisiel.net> | 2009-11-25 00:58:57 +0000 |
---|---|---|
committer | Kamil Kisiel <kamil@kamilkisiel.net> | 2009-11-25 00:58:57 +0000 |
commit | eb7a354edaefd63828f77c6cefd0d2677e53d59a (patch) | |
tree | 3b30791807e0980810d6f9e1ceae3b4255664154 /src/lib | |
parent | 160bc8e029594ce11ff1d84edcbc20209f0dca0d (diff) | |
download | bcfg2-eb7a354edaefd63828f77c6cefd0d2677e53d59a.tar.gz bcfg2-eb7a354edaefd63828f77c6cefd0d2677e53d59a.tar.bz2 bcfg2-eb7a354edaefd63828f77c6cefd0d2677e53d59a.zip |
launchd: fixed return code checks when (un)installing services
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5595 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Client/Tools/launchd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Client/Tools/launchd.py b/src/lib/Client/Tools/launchd.py index 6af7614e3..2b035b6a8 100644 --- a/src/lib/Client/Tools/launchd.py +++ b/src/lib/Client/Tools/launchd.py @@ -83,12 +83,12 @@ class launchd(Bcfg2.Client.Tools.Tool): name = entry.get('name') if entry.get('status') == 'on': self.logger.error("Installing service %s" % name) - cmdrc = self.cmd.run("/bin/launchctl load -w %s" % self.FindPlist(entry))[0] + cmdrc = self.cmd.run("/bin/launchctl load -w %s" % self.FindPlist(entry)) cmdrc = self.cmd.run("/bin/launchctl start %s" % name) else: self.logger.error("Uninstalling service %s" % name) cmdrc = self.cmd.run("/bin/launchctl stop %s" % name) - cmdrc = self.cmd.run("/bin/launchctl unload -w %s" % self.FindPlist(entry))[0] + cmdrc = self.cmd.run("/bin/launchctl unload -w %s" % self.FindPlist(entry)) return cmdrc[0] == 0 def Remove(self, svcs): |