summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cb34423)
raw | patch | inline | side by side (parent: cb34423)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Apr 2008 10:28:46 +0000 (10:28 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Apr 2008 10:28:46 +0000 (10:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10686 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/client/events/corefunctions.pm | patch | blob | history |
index 50ad0af09f8b0f12d67553bd4ffad3f812035716..62f744f07fffd2fc4ed9ad1238f0ed5a87a1ec4a 100644 (file)
use GOSA::GosaSupportDaemon;
use File::Basename;
-my ($ldap_enabled, $ldap_config, $pam_config, $nss_config, $fai_logpath);
+my ($ldap_enabled, $offline_enabled, $ldap_config, $pam_config, $nss_config, $fai_logpath);
my %cfg_defaults = (
"client" => {
"ldap" => [\$ldap_enabled, 1],
+ "offline-ldap" => [\$offline_enabled, 0],
"ldap-config" => [\$ldap_config, "/etc/ldap/ldap.conf"],
"pam-config" => [\$pam_config, "/etc/pam_ldap.conf"],
"nss-config" => [\$nss_config, "/etc/libnss-ldap.conf"],
close(file1);
daemon_log("wrote $cfg_name", 5);
+ # Write offline config
+ if ($offline_enabled){
+ $cfg_name= "/etc/ldap/ldap-offline.conf";
+
+ # Get first LDAP server
+ open(file1, "> $cfg_name");
+ print file1 "LDAP_BASE=\"$ldap_base\"\n";
+ print file1 "LDAP_SERVER=\"127.0.0.1\"\n";
+ print file1 "LDAP_URIS=\"ldap://127.0.0.1\"\n";
+ print file1 "ADMIN_BASE=\"$admin_base\"\n";
+ print file1 "DEPARTMENT=\"$department\"\n";
+ print file1 "RELEASE=\"$release\"\n";
+ print file1 "UNIT_TAG=\"".(defined $unit_tag ? "$unit_tag" : "")."\"\n";
+ print file1 "UNIT_TAG_FILTER=\"".(defined $unit_tag ? "(gosaUnitTag=$unit_tag)" : "")."\"\n";
+ close(file1);
+ daemon_log("wrote $cfg_name", 5);
+ }
+
return;
}