Set less permissive filemode on pxe file, fix force param in zone-sync

This commit is contained in:
nikolark committed 2015-10-14 20:44:43 +02:00
1 parent 2df1f6ab36
commit 4daf775adb
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ class Command(BaseCommand):
for zone in chain(Domain.objects.all(),
Ip4Subnet.objects.all(),
Ip6Subnet.objects.all()):
if zone.domain_serial == zone.domain_active_serial or force:
if zone.domain_serial == zone.domain_active_serial and not force:
continue
if self.update_zone(zone):
self.changes[zone.domain_name]['success'] = True
+1
View File
@@ -101,6 +101,7 @@ def create_pxe_key_and_write_pxe_files_when_host_changes(sender, instance, creat
with open(path, 'w+') as f:
f.write(pxe_file)
logger.info("Created or updated {}".format(path))
os.chmod(path, 0o644) # Not writeable for all
# Also set necessary fields for pxe installation
interfaces = host.interface_set.exclude(ip4address__isnull=True)