summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5572783)
raw | patch | inline | side by side (parent: 5572783)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Sep 2008 06:32:05 +0000 (06:32 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 10 Sep 2008 06:32:05 +0000 (06:32 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12384 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/server/events/gosaTriggered.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 1807d9c824f1f5e88fdcd2fc7e0d82b44f2e2aca..7fc04abdd7eefdb7e87ac7f61b3d1243253a0032 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
$wake_on_lan_passwd, $job_synchronization, $modified_jobs_loop_delay,
$arp_enabled, $arp_interface,
$opsi_enabled, $opsi_server, $opsi_admin, $opsi_password,
+ $new_systems_ou,
);
# additional variable which should be globaly accessable
"job-queue-loop-delay" => [\$job_queue_loop_delay, 3],
"messaging-db-loop-delay" => [\$messaging_db_loop_delay, 3],
"key" => [\$GosaPackages_key, "none"],
+ "new-systems-ou" => [\$new_systems_ou, 'ou=systems'],
},
"ClientPackages" => {
"key" => [\$ClientPackages_key, "none"],
index fd8544cfc5d37d8a0fac747b71626c479f399d60..0823eb0a967e286ec84748473871cf61eb79ec5e 100644 (file)
my $changed_attributes_counter = 0;
eval {
-
my $ldap_mesg= $ldap_handle->search(
base => $main::ldap_base,
scope => 'sub',
);
# TODO: Find a way to guess an ip address for hosts with no ldap entry (MAC->ARP->IP)
-
if($ldap_mesg->count == 1) {
&main::daemon_log("DEBUG: One system with mac address '$mac' was found in base '".$main::ldap_base."'!", 6);
# Get the entry from LDAP
);
# TODO: Find a way to guess an ip address for hosts with no ldap entry (MAC->ARP->IP)
-
if($ldap_mesg->count == 1) {
$ldap_entry= $ldap_mesg->pop_entry();
# Check for needed objectClasses
# $ldap_entry = Net::LDAP::Entry->new();
# $ldap_entry->dn("cn=$mac,$base");
&main::daemon_log("WARNING: No System with mac address '$mac' was found in base '".$main::ldap_base."'! Re-queuing job.", 4);
- $main::job_db->exec_statement("UPDATE jobs SET status = 'waiting', timestamp = '".&get_time()."' WHERE id = $jobdb_id");
+ $main::job_db->exec_statement("UPDATE jobs SET status = 'waiting' WHERE id = $jobdb_id");
+ $main::job_db->exec_statement("UPDATE jobs SET timestamp = '".&get_time()."' WHERE id = $jobdb_id");
return;
} else {
&main::daemon_log("ERROR: More than one system with mac address '$mac' was found in base '".$main::ldap_base."'!", 1);
&main::daemon_log("ERROR: activate_new failed with '$@'!", 1);
}
- # Delete job
- $main::job_db->exec_statement("DELETE FROM jobs WHERE id = $jobdb_id");
+ # Set job to done
+ $main::job_db->exec_statement("UPDATE jobs SET status = 'done' WHERE id = $jobdb_id");
# create set_activated_for_installation message for delivery
my $out_hash = &create_xml_hash("set_activated_for_installation", $source, $target);