diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-12-13 21:38:02 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-12-13 21:38:02 +0000 |
commit | f3eb3148238ea38683c1586518bbecd108353c65 (patch) | |
tree | e31930d3411b23eebecec43cb4ddc358074d7059 /src/lib/Client/Redhat.py | |
parent | a4b92de008aa1d56b521aebbfeaf442201df5a18 (diff) | |
download | bcfg2-f3eb3148238ea38683c1586518bbecd108353c65.tar.gz bcfg2-f3eb3148238ea38683c1586518bbecd108353c65.tar.bz2 bcfg2-f3eb3148238ea38683c1586518bbecd108353c65.zip |
set keyword attributes on most files
added Ed's client and server cleanups
Modified the debian and redhat toolsets to produce nicer output
** Broke performance reports
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1623 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Redhat.py')
-rw-r--r-- | src/lib/Client/Redhat.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py index 57f1a17ba..6c9d0d7c9 100644 --- a/src/lib/Client/Redhat.py +++ b/src/lib/Client/Redhat.py @@ -1,5 +1,5 @@ # This is the bcfg2 support for redhat -# $Id: $ +# $Id$ '''This is redhat client support''' __revision__ = '$Revision$' @@ -10,6 +10,7 @@ from Bcfg2.Client.Toolset import Toolset, saferun class ToolsetImpl(Toolset): '''This class implelements support for rpm packages and standard chkconfig services''' + __name__ = 'Redhat' pkgtool = {'rpm':("rpm --oldpackage --replacepkgs --quiet -U %s", ("%s", ["url"]))} def __init__(self, cfg, setup): @@ -111,21 +112,21 @@ class ToolsetImpl(Toolset): self.pkgwork['remove'] = [] self.Inventory() else: - self.CondPrint('verbose', "Need to remove packages: %s" % self.pkgwork['remove']) + self.CondDisplayList('verbose', "Need to remove packages", self.pkgwork['remove']) if len(self.extra_services) > 0: if self.setup['remove'] in ['all', 'services']: - self.CondPrint('verbose', "Removing services: %s" % self.extra_services) + self.CondDisplayList('verbose', 'Removing services:', self.extra_services) for service in self.extra_services: if not system("/sbin/chkconfig %s off" % service): self.extra_services.remove(service) else: - self.CondPrint('verbose', "Need to remove services: %s" % self.extra_services) + self.CondDisplayList('verbose', 'Need to remove services:', self.extra_services) def Inventory(self): '''Do standard inventory plus debian extra service check''' Toolset.Inventory(self) allsrv = [line.split()[0] for line in popen("/sbin/chkconfig --list|grep :on").readlines()] - self.CondPrint('debug', "Found active services: %s" % allsrv) + self.CondDisplayList('debug', 'Found active services:', allsrv) csrv = self.cfg.findall(".//Service") [allsrv.remove(svc.get('name')) for svc in csrv if svc.get('status') == 'on' and svc.get('name') in allsrv] |