summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb709b3)
raw | patch | inline | side by side (parent: fb709b3)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Aug 2008 08:26:10 +0000 (08:26 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 12 Aug 2008 08:26:10 +0000 (08:26 +0000) |
* update gosa-si-server: some beauty corrections
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12191 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12191 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-client | patch | blob | history | |
gosa-si/gosa-si-server | patch | blob | history |
diff --git a/gosa-si/gosa-si-client b/gosa-si/gosa-si-client
index cba9f598792a8bca994c45a628c090612ccf63d5..3fa4e0dab320c73d550d27564ea71e23d713fd9d 100755 (executable)
--- a/gosa-si/gosa-si-client
+++ b/gosa-si/gosa-si-client
#=== FUNCTIONS = functions =====================================================
+sub usage {
+ print STDERR << "EOF" ;
+usage: $prg [-hvf] [-c config]
+
+ -h : this (help) message
+ -c <file> : config file
+ -f : foreground, process will not be forked to background
+ -v : be verbose (multiple to increase verbosity)
+
+EOF
+ print "\n" ;
+}
+
#=== FUNCTION ================================================================
# NAME: check_cmdline_param
# PARAMETERS:
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 45d2aeb5bbfaaf87dfff997a51717b8e6b2448f9..7e8f395aba06a726c802a961f045d0022c3fb1f8 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
# This is not very nice to look for opsi install jobs, but headertag has to be trigger_action_reinstall. The only way to identify a
# opsi install job is to parse the xml message. There is still the correct header.
- my $sql_statement = "SELECT * FROM ".$job_queue_tn." WHERE ((xmlmessage LIKE '%opsi_install_client</header>%') AND (status='processing'))";
+ my $sql_statement = "SELECT * FROM ".$job_queue_tn." WHERE ((xmlmessage LIKE '%opsi_install_client</header>%') AND (status='processing') AND (siserver='localhost'))";
my $res = $job_db->select_dbentry( $sql_statement );
# Ask OPSI for an update of the running jobs
if (&check_opsi_res($hres)) {
my $htmp= $hres->result->{$hostId};
- # check state != not_installed or action == setup -> load and add
+ # Check state != not_installed or action == setup -> load and add
my $products= 0;
my $installed= 0;
my $installing = 0;
}
}
- # Estimate "rough" progress
+ # Estimate "rough" progress
$result->{'progress'}= int($installed * 100 / $products);
- # Set updates in job queue
+ # Set updates in job queue
if ((not $error) && (not $installing) && ($installed)) {
$act_status = "installed - ".join(", ", @installed_list);
}
}
if ($progress ne $result->{'progress'} ) {
# Updating progress and result
- my $update_statement = "UPDATE $job_queue_tn SET modified='1', ";
- $update_statement .= "progress='".$result->{'progress'}."', result='$act_status' WHERE macaddress='$macaddress'";
+ my $update_statement = "UPDATE $job_queue_tn SET modified='1', progress='".$result->{'progress'}."', result='$act_status' WHERE macaddress='$macaddress' AND siserver='localhost'";
my $update_res = $job_db->update_dbentry($update_statement);
}
if ($progress eq 100) {
} else {
$done_statement .= "status='done'";
}
- $done_statement .= " WHERE macaddress='$macaddress'";
+ $done_statement .= " WHERE macaddress='$macaddress' AND siserver='localhost'";
my $done_res = $job_db->update_dbentry($done_statement);
}
}
-# if a job got an update or was modified anyway, send to all other si-server an update message
-# of this jobs
+# If a job got an update or was modified anyway, send to all other si-server an update message of this jobs.
sub watch_for_modified_jobs {
my ($kernel,$heap) = @_[KERNEL, HEAP];