summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-18 14:53:20 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-18 23:12:25 +0100
commit1ce223017df86b35003a21198b388396e45a2f4d (patch)
treebb1f799a6b286bbf720862268ec85e1933a639f7 /source4/scripting
parentab379ddd516bf2b77ccf77f542faf6e694ab5d4d (diff)
downloadsamba-1ce223017df86b35003a21198b388396e45a2f4d.tar.gz
samba-1ce223017df86b35003a21198b388396e45a2f4d.tar.bz2
samba-1ce223017df86b35003a21198b388396e45a2f4d.zip
s4-dns: added support for --fail-immediately for RODC netlogon dns updates
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/samba_dnsupdate7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
index 1b5bc3eb8a..8f04895655 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -301,12 +301,19 @@ def rodc_dns_update(d, t):
dns_names.names = [ name ]
site_name = sub_vars['SITE'].decode('utf-8')
+ global error_count
+
try:
ret_names = w.DsrUpdateReadOnlyServerDnsRecords(site_name, default_ttl, dns_names)
if ret_names.names[0].status != 0:
print("Failed to set DNS entry: %s (status %u)" % (d, ret_names.names[0].status))
+ error_count = error_count + 1
except RuntimeError, reason:
print("Error setting DNS entry of type %u: %s: %s" % (t, d, reason))
+ error_count = error_count + 1
+
+ if error_count != 0 and opts.fail_immediately:
+ sys.exit(1)
def call_rodc_update(d):