summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ee397a0)
raw | patch | inline | side by side (parent: ee397a0)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 15:52:56 +0000 (15:52 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 30 Jan 2008 15:52:56 +0000 (15:52 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8675 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index d3a47578d50a4546f3c9b3e80005b684a935deb1..d88988cef18dc319265b5d025d927ea14a409be6 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
use Config::IniFiles;
use POSIX;
use Time::HiRes qw( gettimeofday );
+use File::Basename;
use Fcntl;
use IO::Socket::INET;
my $goto_secret;
my $admin_base= "";
my $department= "";
- my $unit_tag= "";
+ my $unit_tag;
# Transform input into array
while ( my ($key, $value) = each(%$msg_hash) ) {
}
# Unit tagging enabled?
- if ($unit_tag != ""){
+ if (defined $unit_tag){
push (@pam_options, "pam_filter gosaUnitTag=$unit_tag");
push (@nss_options, "nss_base_passwd $admin_base?sub?gosaUnitTag=$unit_tag");
push (@nss_options, "nss_base_group $admin_base?sub?gosaUnitTag=$unit_tag");
daemon_log("wrote /etc/goto/secret", 5);
}
+
+
# Write shell based config
- open(file1, "> /etc/ldap/ldap-shell.conf");
+ my $cfg_name= dirname($ldap_config)."/ldap-shell.conf";
+ open(file1, "> $cfg_name");
print file1 "LDAP_BASE=\"$ldap_base\"\n";
print file1 "ADMIN_BASE=\"$admin_base\"\n";
print file1 "DEPARTMENT=\"$department\"\n";
- print file1 "UNIT_TAG=\"$unit_tag\"\n";
- print file1 "UNIT_TAG_FILTER=\"".($unit_tag!="" ? "(gosaUnitTag=$unit_tag)" : "")."\"\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;