diff options
author | Rick Bradshow <bradshaw@mcs.anl.gov> | 2008-10-16 18:42:00 +0000 |
---|---|---|
committer | Rick Bradshow <bradshaw@mcs.anl.gov> | 2008-10-16 18:42:00 +0000 |
commit | 0839add8f4f3e211d7d8628dfaee9952301954f4 (patch) | |
tree | 76dcdcd5f27a60f6cf26f81de318f55fafb1e05c | |
parent | 7c23c69f67f378c2c7b7c1b33bcceb787dadf2b2 (diff) | |
download | bcfg2-0839add8f4f3e211d7d8628dfaee9952301954f4.tar.gz bcfg2-0839add8f4f3e211d7d8628dfaee9952301954f4.tar.bz2 bcfg2-0839add8f4f3e211d7d8628dfaee9952301954f4.zip |
fix for reverse zone building.
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4949 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r-- | src/lib/Server/Plugins/Hostbase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Hostbase.py b/src/lib/Server/Plugins/Hostbase.py index f04d64e7c..08a521545 100644 --- a/src/lib/Server/Plugins/Hostbase.py +++ b/src/lib/Server/Plugins/Hostbase.py @@ -255,6 +255,9 @@ class Hostbase(StructurePlugin,GeneratorPlugin): self.filedata[reversezone[1]] = self.templates['reversesoa'].render(context) self.filedata[reversezone[1] + '.external'] = self.templates['reversesoa'].render(context) + self.filedata[reversezone[1]] += reversezone[9] + self.filedata[reversezone[1] + '.external'] += reversezone[9] + subnet = reversezone[1].split(".") subnet.reverse() reversenames.append((reversezone[1].rstrip('.rev'),".".join(subnet[1:]))) @@ -355,7 +358,7 @@ class Hostbase(StructurePlugin,GeneratorPlugin): hosts = [] hostdata = [dhcphosts[0][0], dhcphosts[0][1], dhcphosts[0][2]] if len(dhcphosts) > 1: - for x in range(1, len(cursor.fetchall())): + for x in range(1, len(dhcphosts)): # if an interface has 2 or more ip addresses # adds the ip to the current interface if hostdata[0].split(".")[0] == dhcphosts[x][0].split(".")[0] and hostdata[1] == dhcphosts[x][1]: |