From becc7302f038dfc0237021a55aeefa4c601893e5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 6 Oct 2004 13:57:42 +0000 Subject: r2829: REALM and netbiosname are always uppercase dnsname and dnshostname always lowercase metze (This used to be commit 0b46dc6f4b3614fc1d258653f0c8df63586539b6) --- source4/script/provision.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source4/script') diff --git a/source4/script/provision.pl b/source4/script/provision.pl index b1070d2013..8863653e34 100755 --- a/source4/script/provision.pl +++ b/source4/script/provision.pl @@ -12,6 +12,7 @@ my $opt_nobody; my $opt_nogroup; my $opt_wheel; my $opt_users; +my $dnsdomain; my $dnsname; my $basedn; @@ -87,6 +88,10 @@ sub substitute($) return $opt_realm; } + if ($var eq "DNSDOMAIN") { + return $dnsdomain; + } + if ($var eq "HOSTNAME") { return $opt_hostname; } @@ -230,6 +235,10 @@ if ($opt_help || ShowHelp(); } +$opt_realm=uc($opt_realm); +$opt_domain=uc($opt_domain); +$opt_hostname=uc($opt_hostname); + print "Provisioning host '$opt_hostname' for domain '$opt_domain' in realm '$opt_realm'\n"; if (!$opt_nobody) { @@ -269,7 +278,8 @@ print "Using nobody='$opt_nobody' nogroup='$opt_nogroup' wheel='$opt_wheel' u print "generating ldif ...\n"; -$dnsname = "$opt_hostname.$opt_realm"; +$dnsdomain = lc($opt_realm); +$dnsname = lc($opt_hostname).".".$dnsdomain; $basedn = "DC=" . join(",DC=", split(/\./, $opt_realm)); my $data = FileLoad("provision.ldif") || die "Unable to load provision.ldif\n"; -- cgit