index 41480116ea299c98205f067675ced9e4eb7e37df..70d3bff70d5ff16501bdb9ed69baa455d324ebfa 100644 (file)
my $opts_file_FH;
my $hostname= $main::client_dnsname;
$hostname =~ s/\..*$//;
+ $hostname =~ tr/A-Z/a-z/;
open($opts_file_FH, ">$main::opts_file");
- binmode($opts_file_FH);
print $opts_file_FH "MAC=\"$main::client_mac_address\"\n";
print $opts_file_FH "IPADDRESS=\"$main::client_ip\"\n";
print $opts_file_FH "HOSTNAME=\"$hostname\"\n";
my $file1;
my $file2;
open(file1, "> $ldap_config");
- binmode(file1);
+#print STDERR Dumper(PerlIO::get_layers(file1, output => 1));
print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n";
print file1 "URI";
foreach $element (@ldap_uris) {
# Setup pam_ldap.conf / libnss-ldap.conf
open(file1, "> $pam_config");
- binmode(file1);
open(file2, "> $nss_config");
- binmode(file2);
print file1 "# This file was automatically generated by gosa-si-client. Do not change.\n";
print file2 "# This file was automatically generated by gosa-si-client. Do not change.\n";
print file1 "uri";
chown(0,0, "/etc/goto/secret");
chmod(0600, "/etc/goto/secret");
open(file1, "> /etc/goto/secret");
- binmode(file1);
print file1 "GOTOADMIN=\"$goto_admin\"\nGOTOSECRET=\"$goto_secret\"\n";
close(file1);
daemon_log("wrote /etc/goto/secret", 5);
}
# Write shell based config
- my $cfg_name= dirname($ldap_config)."/ldap-shell.conf";
+ my $cfg_name= "/etc/ldap/ldap-shell.conf";
# Get first LDAP server
my $ldap_server= $ldap_uris[0];
$ldap_server=~ s/^ldap:\/\/([^:]+).*$/$1/;
open(file1, "> $cfg_name");
- binmode(file1);
print file1 "LDAP_BASE=\"$ldap_base\"\n";
print file1 "LDAP_SERVER=\"$ldap_server\"\n";
+ print file1 "LDAP_URIS=\"@ldap_uris\"\n";
print file1 "ADMIN_BASE=\"$admin_base\"\n";
print file1 "DEPARTMENT=\"$department\"\n";
print file1 "RELEASE=\"$release\"\n";