diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 1d59cd75ef7a83776f0ee1e0e48e4aed731be3cf..81c0618e4a2f547bc6ce5d2ff5d9790bbfdf9e71 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
32 : ldap connectivity
64 : database status and connectivity
128 : main process
+ 256 : creation of packages_list_db
+ 512 : ARP debug information
EOF
exit(0);
}
if($new_status eq "down"){
daemon_log("$session_id WARNING: set '$address' from status '$act_status' to '$new_status'", 3);
} else {
- daemon_log("$session_id INFO: set '$address' from status '$act_status' to '$new_status'", 5);
+ daemon_log("$session_id DEBUG: set '$address' from status '$act_status' to '$new_status'", 138);
}
}
}
if($new_status eq "down"){
daemon_log("$session_id WARNING: set '$address' from status '$act_status' to '$new_status'", 3);
} else {
- daemon_log("$session_id INFO: set '$address' from status '$act_status' to '$new_status'", 5);
+ daemon_log("$session_id DEBUG: set '$address' from status '$act_status' to '$new_status'", 138);
}
}
}
||($job_header eq "trigger_action_reinstall")
||($job_header eq "trigger_activate_new")
) {
- &reactivate_job_with_delay($session_id, $job_target, $job_header, 30 );
-
+ if ($job_target =~ /^([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})$/i) {
+ &reactivate_job_with_delay($session_id, $job_target, $job_header, 30 );
+ } else {
+ # If we don't have the mac adress at this time, we use the plainname
+ my $plainname_result = $job_db->select_dbentry("SELECT plainname from jobs where id=$jobdb_id");
+ my $plainname = $job_target;
+ if ((keys(%$plainname_result) > 0) ) {
+ $plainname = $plainname_result->{1}->{$job_target};
+ }
+ &reactivate_job_with_delay($session_id, $plainname, $job_header, 30 );
+ }
# For all other messages
} else {
my $sql_statement = "UPDATE $job_queue_tn ".
if (not defined $delay) { $delay = 30 } ;
my $delay_timestamp = &calc_timestamp(&get_time(), "plus", $delay);
- my $sql = "UPDATE $job_queue_tn Set timestamp='$delay_timestamp', status='waiting' WHERE (macaddress LIKE 'target' AND headertag='$header')";
+ my $sql = "UPDATE $job_queue_tn Set timestamp='$delay_timestamp', status='waiting' WHERE (macaddress LIKE '$target' OR plainname LIKE '$target') AND headertag='$header'";
my $res = $job_db->update_dbentry($sql);
daemon_log("$session_id INFO: '$header'-job will be reactivated at '$delay_timestamp' ".
"cause client '$target' is currently not available", 5);
# Target of msg is a mac address
elsif( $answer_target =~ /^([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})$/i ) {
- daemon_log("$session_id INFO: target is mac address '$answer_target', looking for host in known_clients and foreign_clients", 5);
+ daemon_log("$session_id DEBUG: target is mac address '$answer_target', looking for host in known_clients and foreign_clients", 138);
# Looking for macaddress in known_clients
my $sql_statement = "SELECT * FROM known_clients WHERE macaddress LIKE '$answer_target'";
$repo_dirs{ "${repo_path}/pool" } = 1;
foreach $package ("Packages.gz"){
- daemon_log("$session_id DEBUG: create_packages_list: fetch $baseurl, $dist, $section", 7);
+ daemon_log("$session_id DEBUG: create_packages_list: fetch $baseurl, $dist, $section", 266);
get_package( "$baseurl/dists/$dist/$section/binary-$arch/$package", "$outdir/$dist/$section", $session_id );
parse_package( "$outdir/$dist/$section", $dist, $path, $session_id );
}
# This is ugly, but I've no time to take a look at "how it works in perl"
if(0 == system("wget '$url' -O '$dest' 2>/dev/null") ) {
system("gunzip -cd '$dest' > '$dest.in'");
- daemon_log("$session_id DEBUG: run command: gunzip -cd '$dest' > '$dest.in'", 7);
+ daemon_log("$session_id DEBUG: run command: gunzip -cd '$dest' > '$dest.in'", 266);
unlink($dest);
- daemon_log("$session_id DEBUG: delete file '$dest'", 7);
+ daemon_log("$session_id DEBUG: delete file '$dest'", 266);
} else {
daemon_log("$session_id ERROR: create_packages_list_db: get_packages: fetching '$url' into '$dest' failed!", 1);
}
if( -f "$dir/DEBIAN/templates" ) {
- daemon_log("0 DEBUG: Found debconf templates in '$package' - $newver", 7);
+ daemon_log("0 DEBUG: Found debconf templates in '$package' - $newver", 266);
my $tmpl= ""; {
local $/=undef;