Commit 4daf775a authored by Nikolai Kristiansen's avatar Nikolai Kristiansen
Browse files

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

parent 2df1f6ab
Pipeline #7 skipped
......@@ -59,7 +59,7 @@ class Command(BaseCommand):
for zone in chain(Domain.objects.all(),
if zone.domain_serial == zone.domain_active_serial or force:
if zone.domain_serial == zone.domain_active_serial and not force:
if self.update_zone(zone):
self.changes[zone.domain_name]['success'] = True
......@@ -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)"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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment