s4-selftest: Avoid duplicating the servers IP in the provision() sub arguments.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 18 Apr 2011 06:09:30 +0000 (16:09 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Apr 2011 04:26:58 +0000 (14:26 +1000)
This should make it easier to change the IP address.

Andrew Bartlett

selftest/target/Samba4.pm

index 8054ee7527801998d64c67dc27f87d58435910f7..a5a77bb1935f0dc68b70fc716749f063304b2177 100644 (file)
@@ -677,6 +677,11 @@ sub provision_raw_step1($$)
 
        $self->mk_keyblobs($ctx->{tlsdir});
 
+        #Default the KDC IP to the server's IP
+       if (not defined($ctx->{kdc_ipv4})) {
+             $ctx->{kdc_ipv4} = $ctx->{ipv4};
+        }
+
        $self->mk_krb5_conf($ctx);
 
        open(PWD, ">$ctx->{nsswrap_passwd}");
@@ -1035,7 +1040,7 @@ sub provision_dc($$)
                                   "2008",
                                   1,
                                   "locDCpass1",
-                                  "127.0.0.1", "netbios aliases = DC1");
+                                  undef, "netbios aliases = DC1");
 
        return undef unless(defined $ret);
        unless($self->add_wins_config("$prefix/private")) {
@@ -1066,7 +1071,7 @@ sub provision_fl2000dc($$)
                                   "2000",
                                   5,
                                   "locDCpass5",
-                                  "127.0.0.5", "");
+                                  undef, "");
 
        unless($self->add_wins_config("$prefix/private")) {
                warn("Unable to add wins configuration");
@@ -1089,7 +1094,7 @@ sub provision_fl2003dc($$)
                                   "2003",
                                   6,
                                   "locDCpass6",
-                                  "127.0.0.6", "");
+                                  undef, "");
 
        unless($self->add_wins_config("$prefix/private")) {
                warn("Unable to add wins configuration");
@@ -1112,7 +1117,7 @@ sub provision_fl2008r2dc($$)
                                   "2008_R2",
                                   7,
                                   "locDCpass7",
-                                  "127.0.0.7", "");
+                                  undef, "");
 
        unless ($self->add_wins_config("$prefix/private")) {
                warn("Unable to add wins configuration");