From 68f9d510e75cca320e0a456f9ff6a2aef3bb171f Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Wed, 24 Jul 2013 09:27:01 -0300 Subject: Use fullpath --- config/openbgpd/openbgpd_status.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'config/openbgpd') diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index a5bbc31c..d712b9f1 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -32,14 +32,14 @@ require("guiconfig.inc"); $commands = array(); -defCmdT("summary", "OpenBGPD Summary", "bgpctl show summary"); -defCmdT("interfaces", "OpenBGPD Interfaces", "bgpctl show interfaces"); -defCmdT("routing", "OpenBGPD Routing", "bgpctl show rib | sed '1,4d'"); -defCmdT("forwarding", "OpenBGPD Forwarding", "bgpctl show fib"); -defCmdT("network", "OpenBGPD Network", "bgpctl show network"); -defCmdT("nexthops", "OpenBGPD Nexthops", "bgpctl show nexthop"); -defCmdT("ip", "OpenBGPD IP", "bgpctl show ip bgp"); -defCmdT("neighbors", "OpenBGPD Neighbors", "bgpctl show neighbor"); +defCmdT("summary", "OpenBGPD Summary", "/usr/local/sbin/bgpctl show summary"); +defCmdT("interfaces", "OpenBGPD Interfaces", "/usr/local/sbin/bgpctl show interfaces"); +defCmdT("routing", "OpenBGPD Routing", "/usr/local/sbin/bgpctl show rib | sed '1,4d'"); +defCmdT("forwarding", "OpenBGPD Forwarding", "/usr/local/sbin/bgpctl show fib"); +defCmdT("network", "OpenBGPD Network", "/usr/local/sbin/bgpctl show network"); +defCmdT("nexthops", "OpenBGPD Nexthops", "/usr/local/sbin/bgpctl show nexthop"); +defCmdT("ip", "OpenBGPD IP", "/usr/local/sbin/bgpctl show ip bgp"); +defCmdT("neighbors", "OpenBGPD Neighbors", "/usr/local/sbin/bgpctl show neighbor"); if (isset($_REQUEST['isAjax'])) { if (isset($_REQUEST['cmd']) && isset($commands[$_REQUEST['cmd']])) @@ -57,9 +57,9 @@ include("head.inc"); function doCmdT($command, $limit = "all", $filter = "") { $grepline = ""; if (!empty($filter)) - $grepline = " | grep " . escapeshellarg(htmlspecialchars($filter)); + $grepline = " | /usr/bin/grep " . escapeshellarg(htmlspecialchars($filter)); if (is_numeric($limit) && $limit > 0) - $headline = " | head -n {$limit}"; + $headline = " | /usr/bin/head -n {$limit}"; $fd = popen("{$command}{$grepline}{$headline} 2>&1", "r"); $ct = 0; -- cgit v1.2.3