diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3d5f6dbb6e..43e3289e46 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-09-29 Junichi Satoh + + * include/ajax/events.php: Added timeout binary paths to execute + commands for FreeBSD and NetBSD. + 2013-09-29 Junichi Satoh * include/functions_reporting.php: Added missing %s. diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index 8c584096ca..7f69ed3f7c 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -121,7 +121,18 @@ if ($perform_event_response) { $command = get_parameter('target',''); - echo system('/usr/bin/timeout 10 '.io_safe_output($command).' 2>&1'); + switch (PHP_OS) { + case "FreeBSD": + $timeout_bin = '/usr/local/bin/gtimeout'; + break; + case "NetBSD": + $timeout_bin = '/usr/pkg/bin/gtimeout'; + break; + default: + $timeout_bin = '/usr/bin/timeout'; + break; + } + echo system($timeout_bin . ' 10 '.io_safe_output($command).' 2>&1'); return; }