diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-09-26 10:02:43 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-09-26 05:48:25 +0200 |
commit | 3c4d0ce46995f82921f538757783fa7a678a7fc1 (patch) | |
tree | 0dcb67aebca6fa102bf68e245928c0b069cfcf29 /selftest/target | |
parent | 6d7c651f2f61b481c1e1ade1e2e0e756ccef2210 (diff) | |
download | samba-3c4d0ce46995f82921f538757783fa7a678a7fc1.tar.gz samba-3c4d0ce46995f82921f538757783fa7a678a7fc1.tar.bz2 samba-3c4d0ce46995f82921f538757783fa7a678a7fc1.zip |
samba_dnsupdate: Safely update/create names for Samba3 targets as well
This avoids unlocked writes to the dns_hosts_file, and may fix some of our
issues on the build farm where large numbers of tests fail due to failed name resolution.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep 26 05:48:25 CEST 2012 on sn-devel-104
Diffstat (limited to 'selftest/target')
-rwxr-xr-x | selftest/target/Samba3.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index ef22b02865..df8b55c613 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1067,10 +1067,13 @@ domusers:X:$gid_domusers: } print "DONE\n"; - open(HOSTS, ">>$ENV{SELFTEST_PREFIX}/dns_host_file") or die("Unable to open $ENV{SELFTEST_PREFIX}/dns_host_file"); - print HOSTS "A $server. $server_ip -"; - close(HOSTS); + open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list"); + print DNS_UPDATE_LIST "A $server. $server_ip"; + close(DNS_UPDATE_LIST); + + if (system("$ENV{SRCDIR_ABS}/source4/scripting/bin/samba_dnsupdate --all-interfaces --use-file=$dns_host_file -s $conffile --update-list=$prefix/dns_update_list --no-substiutions --no-credentials") != 0) { + die "Unable to update hostname into $dns_host_file"; + } $ret{SERVER_IP} = $server_ip; $ret{NMBD_TEST_LOG} = "$prefix/nmbd_test.log"; |