From 67e1f5c6b05e5c720cdd15424e33860885b6cd40 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Fri, 30 Sep 2005 19:26:49 +0000 Subject: add extra service support (Logical change 1.329) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1344 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Redhat.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/lib/Client/Redhat.py b/src/lib/Client/Redhat.py index 6f03f170b..ee952c0fa 100644 --- a/src/lib/Client/Redhat.py +++ b/src/lib/Client/Redhat.py @@ -131,3 +131,12 @@ class Redhat(Toolset): else: self.CondPrint('verbose', "Need to remove services: %s" % 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("chkconfig --list|grep :on").readlines()] + self.CondPrint('debug', "Found active services: %s" % 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] + self.extra_services = allsrv -- cgit v1.2.3-1-g7c22