mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
2012-06-20 Hirofumi Kosaka <kosaka@rworks.jp>
* extensions/net_tools.php: Fixed bug: cannot find traceroute other than /usr/sbin/traceroute. Merged from 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6605 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0690e32063
commit
331820371e
@ -1,3 +1,9 @@
|
|||||||
|
2012-06-20 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||||
|
|
||||||
|
* extensions/net_tools.php: Fixed bug: cannot find traceroute
|
||||||
|
other than /usr/sbin/traceroute.
|
||||||
|
Merged from 4.0.2
|
||||||
|
|
||||||
2012-06-20 Hirofumi Kosaka <kosaka@rworks.jp>
|
2012-06-20 Hirofumi Kosaka <kosaka@rworks.jp>
|
||||||
|
|
||||||
* include/functions.php: Changed ambiguous time representation
|
* include/functions.php: Changed ambiguous time representation
|
||||||
|
@ -53,16 +53,28 @@ function main_net_tools () {
|
|||||||
|
|
||||||
switch($operation) {
|
switch($operation) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!file_exists('/usr/sbin/traceroute')) {
|
ob_start();
|
||||||
ui_print_error_message(__('Traceroute executable does not exist.'));
|
system('whereis traceroute');
|
||||||
|
$output = ob_get_clean();
|
||||||
|
$result = explode(':', $output);
|
||||||
|
$result = trim($result[1]);
|
||||||
|
if (! empty($result)) {
|
||||||
|
echo "<h3>".__("Traceroute to "). $ip. "</h3>";
|
||||||
|
echo "<pre>";
|
||||||
|
echo system ("traceroute $ip");
|
||||||
|
echo "</pre>";
|
||||||
}
|
}
|
||||||
else {
|
elseif (file_exists('/usr/sbin/traceroute')) {
|
||||||
echo "<h3>".__("Traceroute to "). $ip. "</h3>";
|
echo "<h3>".__("Traceroute to "). $ip. "</h3>";
|
||||||
echo "<pre>";
|
echo "<pre>";
|
||||||
echo system ("/usr/sbin/traceroute $ip");
|
echo system ("/usr/sbin/traceroute $ip");
|
||||||
echo "</pre>";
|
echo "</pre>";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ui_print_error_message(__('Traceroute executable does not exist.'));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
ob_start();
|
ob_start();
|
||||||
system('whereis ping');
|
system('whereis ping');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user