|
@@ -52,7 +52,7 @@ def add_tsig_key_to_zone(container, zone, key_name):
|
52
|
52
|
out = container.exec_run(['pdnsutil', 'set-meta', zone, 'TSIG-ALLOW-DNSUPDATE', key_name])
|
53
|
53
|
if out is not None:
|
54
|
54
|
out = out.decode('UTF-8')
|
55
|
|
- return out == 'Enabled TSIG key %s for %s\n' % (key_name, zone) # might to strict, but as we can not get return code
|
|
55
|
+ return out == 'Set \'%s\' meta TSIG-ALLOW-DNSUPDATE = %s\n' % (zone, key_name) # might to strict, but as we can not get return code
|
56
|
56
|
return False
|
57
|
57
|
|
58
|
58
|
def main():
|
|
@@ -127,6 +127,7 @@ def main():
|
127
|
127
|
print('Adding TSIG %s to zone %s...' % (args.tsig_key_name, zone))
|
128
|
128
|
if not add_tsig_key_to_zone(container, zone, args.tsig_key_name):
|
129
|
129
|
print('Failed to add TSIG key to zone: Unknown error')
|
|
130
|
+ return 8
|
130
|
131
|
|
131
|
132
|
print('DHCP_TSIG_KEY_NAME=%s' % (args.tsig_key_name))
|
132
|
133
|
print('DHCP_TSIG_KEY_ALGO=%s' % (args.tsig_key_algo))
|