From 7d8dff6d77802e4a8ecda775cae5aa9b6e75740f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 23 Nov 2006 01:18:11 +0000 Subject: Fix multiple debinit extra service problem [reported by naapuri] git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2531 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/DebInit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/Client/Tools/DebInit.py b/src/lib/Client/Tools/DebInit.py index 5cfabb4f0..892b8edb4 100644 --- a/src/lib/Client/Tools/DebInit.py +++ b/src/lib/Client/Tools/DebInit.py @@ -51,9 +51,12 @@ class DebInit(Bcfg2.Client.Tools.SvcTool): def FindExtra(self): '''Find Extra Debian Service Entries''' specified = [entry.get('name') for entry in self.getSupportedEntries()] - extra = [self.svcre.match(fname).group('name') for fname in - glob.glob("/etc/rc[12345].d/S*") \ - if self.svcre.match(fname).group('name') not in specified] + extra = [] + for name in [self.svcre.match(fname).group('name') for fname in + glob.glob("/etc/rc[12345].d/S*") \ + if self.svcre.match(fname).group('name') not in specified]: + if name not in extra: + extra.append(name) return [Bcfg2.Client.XML.Element('Service', name=name, type='deb') for name \ in extra] -- cgit v1.2.3-1-g7c22