samba_dnsupdate: flush dns update cache file after write
[samba.git] / source4 / scripting / bin / samba_dnsupdate
index 2ecb2ce9f1ddb8c5cc6293fc10996e847982a9c3..9d45de59fd6fc759da943a7906eb087142d6f569 100755 (executable)
@@ -940,6 +940,7 @@ if rebuild_cache:
         if opts.verbose:
             print("Adding %s to %s" % (str(d), file_name))
         wfile.write(str(d)+"\n")
+    wfile.flush()
     os.rename(tmpfile, dns_update_cache)
 fcntl.lockf(cfile, fcntl.LOCK_UN)