mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
samba_upgradedns: Create binddns_dir if it doesn't already exist
Without doing this, the upgrade process can fail if the directory is not present, e.g. after restoring from an offline backup (which specifically ignores this directory). Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
c6b2846c9d
commit
f5c26f7231
@ -492,6 +492,10 @@ if __name__ == '__main__':
|
||||
else:
|
||||
logger.info("dns-%s account already exists" % hostname)
|
||||
|
||||
if not os.path.exists(paths.binddns_dir):
|
||||
# This directory won't exist if we're restoring from an offline backup.
|
||||
os.mkdir(paths.binddns_dir, 0o770)
|
||||
|
||||
private_dns_keytab_path = os.path.join(paths.private_dir, paths.dns_keytab)
|
||||
bind_dns_keytab_path = os.path.join(paths.binddns_dir, paths.dns_keytab)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user