From: cajus Date: Fri, 22 Feb 2008 12:08:16 +0000 (+0000) Subject: Generate ldap server for shell config, too X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=57f3b6e8184433ec834a4123b5896e00a797e83c;p=gosa.git Generate ldap server for shell config, too git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9066 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client index c107dfc1e..95f056863 100755 --- a/gosa-si/gosa-si-client +++ b/gosa-si/gosa-si-client @@ -598,12 +598,16 @@ sub new_ldap_config { daemon_log("wrote /etc/goto/secret", 5); } - - # Write shell based config my $cfg_name= dirname($ldap_config)."/ldap-shell.conf"; + + # Get first LDAP server + my $ldap_server= $ldap_uris[0]; + $ldap_server=~ s/^ldap:\/\/([^:]+).*$/\1/; + open(file1, "> $cfg_name"); print file1 "LDAP_BASE=\"$ldap_base\"\n"; + print file1 "LDAP_SERVER=\"$ldap_server\"\n"; print file1 "ADMIN_BASE=\"$admin_base\"\n"; print file1 "DEPARTMENT=\"$department\"\n"; print file1 "RELEASE=\"$release\"\n";