2013-09-29 Junichi Satoh <junichi@rworks.jp>
* include/ajax/events.php: Added timeout binary paths to execute commands for FreeBSD and NetBSD. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8824 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c8e012b654
commit
c644f82125
|
@ -1,3 +1,8 @@
|
|||
2013-09-29 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/ajax/events.php: Added timeout binary paths to execute
|
||||
commands for FreeBSD and NetBSD.
|
||||
|
||||
2013-09-29 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* include/functions_reporting.php: Added missing %s.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue