From 58f2f42a48247487fd2ee650c5ae137bbb77f4e0 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 8 Apr 2013 16:17:30 -0300 Subject: Add context parameter for ipfw calls. Fixes #2938 --- usr/local/www/status.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/status.php b/usr/local/www/status.php index 9ba0607..a4906cf 100755 --- a/usr/local/www/status.php +++ b/usr/local/www/status.php @@ -124,7 +124,7 @@ function execCmds() { } } -global $g; +global $g, $config; /* Set up all of the commands we want to execute. */ defCmdT("System uptime","uptime"); @@ -138,7 +138,11 @@ defCmdT("top | head -n5", "/usr/bin/top | /usr/bin/head -n5"); defCmdT("sysctl hw.physmem","/sbin/sysctl hw.physmem"); -defCmdT("ipfw show", "/sbin/ipfw show"); +if (isset($config['captiveportal']) && is_array($config['captiveportal'])) + foreach ($config['captiveportal'] as $cpZone => $cpdata) + if (isset($cpdata['enable'])) + defCmdT("ipfw -x {$cpZone} show", "/sbin/ipfw -x {$cpZone} show"); + defCmdT("pfctl -sn", "/sbin/pfctl -sn"); defCmdT("pfctl -sr", "/sbin/pfctl -sr"); defCmdT("pfctl -ss", "/sbin/pfctl -ss"); -- cgit v1.1