summaryrefslogtreecommitdiffstats
path: root/src/lib/Client
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-09-29 18:46:18 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-09-29 18:46:18 +0000
commit9161d0f9d134f1bd6e8db29dbbbd35b227161196 (patch)
tree7b9534ad88ef15b0ef2ba459b60a437ed86ac85e /src/lib/Client
parentfc730f5f5cf9d94ced252b83478710d5976fb66d (diff)
downloadbcfg2-9161d0f9d134f1bd6e8db29dbbbd35b227161196.tar.gz
bcfg2-9161d0f9d134f1bd6e8db29dbbbd35b227161196.tar.bz2
bcfg2-9161d0f9d134f1bd6e8db29dbbbd35b227161196.zip
add extra reporting/removal support
(Logical change 1.328) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1337 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client')
-rw-r--r--src/lib/Client/Redhat.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py
index 063ef9b48..6f03f170b 100644
--- a/src/lib/Client/Redhat.py
+++ b/src/lib/Client/Redhat.py
@@ -112,3 +112,22 @@ class Redhat(Toolset):
self.CondPrint('debug',
"Package %s content verification failed" % entry.get('name'))
return False
+
+ def HandleExtra(self):
+ '''Deal with extra configuration detected'''
+ if len(self.pkgwork) > 0:
+ if self.setup['remove'] in ['all', 'packages']:
+ self.CondPrint('verbose', "Removing packages: %s" % self.pkgwork['remove'])
+ if not system("rpm -q -e %s" % " ".join(self.pkgwork['remove'])):
+ self.pkgwork['remove'] = []
+ else:
+ self.CondPrint('verbose', "Need to remove packages: %s" % 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)
+ for service in self.extra_services:
+ if not system("chkconfig %s off" % service):
+ self.extra_services.remove(service)
+ else:
+ self.CondPrint('verbose', "Need to remove services: %s" % self.extra_services)
+