diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2005-01-19 03:47:01 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2005-01-19 03:47:01 +0000 |
commit | 7e616c40a7e928f7f8a7fc157498e0fafba65d58 (patch) | |
tree | ac4794b66c28a4994800fd61438662ccca1bd51c /src/lib/Client/Debian.py | |
parent | e36c49b0dc93ec89db4b40f3b76c14724b7fff1f (diff) | |
download | bcfg2-7e616c40a7e928f7f8a7fc157498e0fafba65d58.tar.gz bcfg2-7e616c40a7e928f7f8a7fc157498e0fafba65d58.tar.bz2 bcfg2-7e616c40a7e928f7f8a7fc157498e0fafba65d58.zip |
add extra service support
(Logical change 1.192)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@815 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Debian.py')
-rw-r--r-- | src/lib/Client/Debian.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/Client/Debian.py b/src/lib/Client/Debian.py index c34c82eb0..bb22edeb1 100644 --- a/src/lib/Client/Debian.py +++ b/src/lib/Client/Debian.py @@ -28,7 +28,8 @@ class Debian(Toolset): system("apt-get -q=2 -y update") self.installed = {} self.installed_this_run = [] - self.pkgwork = {'add':[], 'update':[], 'remove':[]} + self.pkgwork = {'add':[], 'update':[], 'remove':[]} + self.extra_services = [] self.Refresh() def Refresh(self): @@ -124,12 +125,18 @@ class Debian(Toolset): # pkgwork contains all one-way verification data now # all data remaining in all is extra packages self.pkgwork['remove'] = all.keys() + # now for packages + allsrv = [] + [allsrv.append(x[14:]) for x in glob.glob("/etc/rc[12345].d/S*") if x[14:] not in allsrv] + csrv = self.cfg.findall(".//Service") + [allsrv.remove(svc.get('name')) for svc in csrv if svc.get('status') == 'on'] + self.extra_services = allsrv def Install(self): '''Correct detected misconfigurations''' self.CondPrint("verbose", "Installing needed configuration changes") cmd = '''apt-get --reinstall -q=2 --force-yes -y install %s''' - print "Need to remove:", self.pkgwork['remove'] + print "Need to remove:", self.pkgwork['remove'], self.extra_services self.setup['quick'] = True self.CondPrint('dryrun', "Packages to update: %s" % (" ".join([pkg.get('name') for pkg in self.pkgwork['update']]))) |