X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-si%2Fclient%2Fevents%2Fcorefunctions.pm;h=70d3bff70d5ff16501bdb9ed69baa455d324ebfa;hb=bb7bc1886a73ea4ff9d82d6c39f10cd9c9221372;hp=41480116ea299c98205f067675ced9e4eb7e37df;hpb=51c0ded118c864f0f59f981e47a8c9ff5432ce93;p=gosa.git diff --git a/gosa-si/client/events/corefunctions.pm b/gosa-si/client/events/corefunctions.pm index 41480116e..70d3bff70 100644 --- a/gosa-si/client/events/corefunctions.pm +++ b/gosa-si/client/events/corefunctions.pm @@ -111,8 +111,8 @@ sub registered { 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"; @@ -236,7 +236,7 @@ sub new_ldap_config { 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) { @@ -251,9 +251,7 @@ sub new_ldap_config { # 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"; @@ -282,23 +280,22 @@ sub new_ldap_config { 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";