diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-10-06 13:57:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:37 -0500 |
commit | becc7302f038dfc0237021a55aeefa4c601893e5 (patch) | |
tree | 3c1926f66edaa428cf8ea8d6728ba641d6b7e15f /source4/script | |
parent | 85428819e3acd408f8aca7db5cd681b828fe37a2 (diff) | |
download | samba-becc7302f038dfc0237021a55aeefa4c601893e5.tar.gz samba-becc7302f038dfc0237021a55aeefa4c601893e5.tar.bz2 samba-becc7302f038dfc0237021a55aeefa4c601893e5.zip |
r2829: REALM and netbiosname are always uppercase
dnsname and dnshostname always lowercase
metze
(This used to be commit 0b46dc6f4b3614fc1d258653f0c8df63586539b6)
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/provision.pl | 12 |
1 files changed, 11 insertions, 1 deletions
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"; |