summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-11-23 01:18:11 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-11-23 01:18:11 +0000
commit7d8dff6d77802e4a8ecda775cae5aa9b6e75740f (patch)
tree9b9ebbe6430bc88edf0065bd49812d795d2473e6
parentdb032e946c96d09841eeab7c549fee1497c615d7 (diff)
downloadbcfg2-7d8dff6d77802e4a8ecda775cae5aa9b6e75740f.tar.gz
bcfg2-7d8dff6d77802e4a8ecda775cae5aa9b6e75740f.tar.bz2
bcfg2-7d8dff6d77802e4a8ecda775cae5aa9b6e75740f.zip
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
-rw-r--r--src/lib/Client/Tools/DebInit.py9
1 files changed, 6 insertions, 3 deletions
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]