From: rettenbe Date: Wed, 24 Sep 2008 11:55:07 +0000 (+0000) Subject: bugfix: trigger_goto_settings_reload catches error case X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=539f760f9c765f592c03ad827e2679ba8b032d88;p=gosa.git bugfix: trigger_goto_settings_reload catches error case git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12543 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/client/events/gosaTriggered.pm b/gosa-si/client/events/gosaTriggered.pm index fd954cab1..71da3267a 100644 --- a/gosa-si/client/events/gosaTriggered.pm +++ b/gosa-si/client/events/gosaTriggered.pm @@ -500,8 +500,14 @@ sub trigger_goto_settings_reload { my ($msg, $msg_hash) = @_; # Execute goto settings reload - system("/etc/init.d/goto-configure start"); - + my $cmd = "/etc/init.d/goto-configure"; + my $pram = "start"; + if (-f $cmd){ + my $feedback = system("$cmd $pram") or &main::daemon_log("ERROR: $@"); + } else { + &main::daemon_log("ERROR: cannot exec $cmd, file not found!"); + } + return; } diff --git a/gosa-si/tests/client.php b/gosa-si/tests/client.php index 15fe84513..450a377f5 100755 --- a/gosa-si/tests/client.php +++ b/gosa-si/tests/client.php @@ -59,6 +59,7 @@ for($count = 1; $count <= $zahl; $count++) # trigger jobs at client + $data = "
gosa_trigger_goto_settings_reload
00:01:6c:9d:b9:fa GOSA
"; #$data = "
gosa_detect_hardware
10.89.1.31:20083 GOSA
"; #$data = "
gosa_new_key_for_client
00:01:6c:9d:b9:fa 10.89.1.31:20081
"; #$data = "
job_trigger_action_wake
00:01:6c:9d:b9:fa GOSA 19700101000000
"; @@ -185,7 +186,7 @@ for($count = 1; $count <= $zahl; $count++) # Querying the mailqueue at #$data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa
"; - $data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa recipient eq retta
"; + #$data = "
gosa_mailqueue_query
GOSA 00:01:6c:9d:b9:fa recipient eq retta
"; # Multiple xml tags msg_id are allowed #$data = "
gosa_mailqueue_hold
GOSA 00:01:6c:9d:b9:fa 99C8ABEF23
";