|
150 |
"""Handle removal of zone.""" |
150 |
"""Handle removal of zone.""" |
151 |
ud.debug(ud.LISTENER, ud.INFO, 'DNS: Removing zone %s' % (zonename,)) |
151 |
ud.debug(ud.LISTENER, ud.INFO, 'DNS: Removing zone %s' % (zonename,)) |
152 |
zonefile = os.path.join(NAMED_CONF_DIR, zonename) |
152 |
zonefile = os.path.join(NAMED_CONF_DIR, zonename) |
|
|
153 |
cached_zonefile = os.path.join(NAMED_CACHE_DIR, zonename + '.zone') |
153 |
# Remove zone file |
154 |
# Remove zone file |
154 |
if os.path.exists(zonefile): |
155 |
if os.path.exists(zonefile): |
155 |
os.unlink(zonefile) |
156 |
os.unlink(zonefile) |
156 |
# Remove proxy configuration file |
157 |
# Remove proxy configuration file |
157 |
if os.path.exists(zonefile + '.proxy'): |
158 |
if os.path.exists(zonefile + '.proxy'): |
158 |
os.unlink(zonefile + '.proxy') |
159 |
os.unlink(zonefile + '.proxy') |
|
|
160 |
# Remove cached zone file |
161 |
if os.path.exists(cached_zonefile): |
162 |
os.unlink(cached_zonefile) |
159 |
global __zone_created_or_removed |
163 |
global __zone_created_or_removed |
160 |
__zone_created_or_removed = True |
164 |
__zone_created_or_removed = True |
161 |
|
165 |
|