diff options
author | Zach Lowry <zach@mcs.anl.gov> | 2005-07-13 16:25:20 +0000 |
---|---|---|
committer | Zach Lowry <zach@mcs.anl.gov> | 2005-07-13 16:25:20 +0000 |
commit | 5497b58292d88d49fe197fc5bdffbd06d86a348f (patch) | |
tree | 6887b1aa9328b8f82d294678fc507251ca999225 /src/lib/Client | |
parent | 720472cbd76529a2bea484e5b60187f9430a40f1 (diff) | |
download | bcfg2-5497b58292d88d49fe197fc5bdffbd06d86a348f.tar.gz bcfg2-5497b58292d88d49fe197fc5bdffbd06d86a348f.tar.bz2 bcfg2-5497b58292d88d49fe197fc5bdffbd06d86a348f.zip |
fix conflict with pylint corrections
2005/07/13 11:19:29-05:00 anl.gov!zach
fix odata bug ?\008
add modlist to solaris
fix Inventory
(Logical change 1.255)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1051 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r-- | src/lib/Client/Solaris.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/Client/Solaris.py b/src/lib/Client/Solaris.py index c3c4b02a1..1be32410b 100644 --- a/src/lib/Client/Solaris.py +++ b/src/lib/Client/Solaris.py @@ -65,8 +65,8 @@ class Solaris(Toolset): else: return False - def VerifyPackage(self, entry): - '''Verify Package status for entry''' + def VerifyPackage(self, entry, modlist): + '''Verify Package status for entry''' if not (entry.get('name') and entry.get('version')): print "Can't verify package, not enough data." return False @@ -78,28 +78,29 @@ class Solaris(Toolset): if self.setup['quick']: return True verp = Popen4("/usr/sbin/pkgchk -n %s" % (entry.get('name')), bufsize=16384) - odata = '' + odata = verp.fromchild.read( vstat = verp.poll() while vstat == -1: odata += verp.fromchild.read() vstat = verp.poll() - output = [line for line in odata.split("\n") if line] + output = [line for line in odata.split("\n") if line.find('ERROR')] if vstat == 0: return True else: - # if len([name for name in output if name.split()[-1] not in modlist]): - # return True - # else: + if len([name for name in output if name.split()[-1] not in modlist]): + return True + else: self.CondPrint('debug', "Package %s content verification failed" % (entry.get('name'))) return False def Inventory(self): '''Do standard inventory plus debian extra service check''' Toolset.Inventory(self) - allsrv = popen("/usr/bin/svcs -a -H -o SVC").readlines() - # for goodline [ x.strip() for x in openfile.readlines()] + allsrv = [ x.strip() for x in popen("/usr/bin/svcs -a -H -o SVC").readlines() ] csrv = self.cfg.findall(".//Service") - print csrv + nsrv = [ r for r in [ popen("/usr/bin/svcs -H -o FMRI %s " % s).read().strip() for s in csrv ] if r ] + allsrv.remove(svc.get('name')) for svc in csrv if svc.get('status') == 'on' and svc.get('name') in allsrv] + self.extra_services = allsrv def HandleExtra(self): '''Deal with extra configuration detected''' |