summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 713f5de)
raw | patch | inline | side by side (parent: 713f5de)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 09:50:10 +0000 (09:50 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 22 Oct 2007 09:50:10 +0000 (09:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7618 594d385d-05f5-0310-b6e9-bd551577e9d8
contrib/daemon/gosa-sd | patch | blob | history |
diff --git a/contrib/daemon/gosa-sd b/contrib/daemon/gosa-sd
index 78e4fd93905ccb75cefb63ee604f447c331f3053..3db6576aafbe6cf17b61af48a37ca7eea7d88fa1 100755 (executable)
--- a/contrib/daemon/gosa-sd
+++ b/contrib/daemon/gosa-sd
$procid = -1 ;
$foreground = 0 ;
$verbose = 0 ;
-$max_process = 1 ;
+$max_process = 2 ;
$max_process_timeout = 1 ;
$ldap_base = "dc=gonicus,dc=de" ;
#$ldap_path = "/var/run/gosa-support-daemon.socket";
sub add_ldap_entry {
my ($ldap_tree, $ldap_base, $mac, $gotoSysStatus, $ip, $interface, $desc) = @_;
my $dn = "cn=$mac,ou=incoming,$ldap_base";
-
- my $s_res = &search_ldap_entry($ldap_tree, $ldap_base, "(macAddress=$mac)");
+ my $s_res = &search_ldap_entry($ldap_tree, $ldap_base, "(|(macAddress=$mac)(dhcpHWAddress=ethernet $mac))");
my $c_res = $s_res->count;
if($c_res == 1) {
daemon_log("WARNING: macAddress $mac already in LDAP", 1);
my ($ldap_tree, $ldap_base, $mac, $gotoSysStatus ) = @_;
# check if ldap_entry exists or not
- my $s_res = &search_ldap_entry($ldap_tree, $ldap_base, "(macAddress=$mac)");
+ my $s_res = &search_ldap_entry($ldap_tree, $ldap_base, "(|(macAddress=$mac)(dhcpHWAddress=ethernet $mac))");
my $c_res = $s_res->count;
if($c_res == 0) {
daemon_log("WARNING: macAddress $mac not in LDAP", 1);
sysopen(FIFO, $fifo_path, O_RDONLY) or die "can't read from $fifo_path: $!" ;
while( 1 ) {
- # wenn FIFO nicht offen, dann öffne ihn
-
# checke alle prozesse im hash daemon_children ob sie noch aktiv sind, wenn
# nicht, dann entferne prozess aus hash
while( (my $key, my $val) = each( %daemon_children) ) {
# ldap add
- sleep( 1 ) ;
$ldap->unbind;
exit;
}