From 57f3b6e8184433ec834a4123b5896e00a797e83c Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 22 Feb 2008 12:08:16 +0000 Subject: [PATCH] Generate ldap server for shell config, too git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9066 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-si/gosa-si-client | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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"; -- 2.30.2