function readChain($chain)
{
- require_once 'System.php';
-
- $iptables = System::which('iptables', '/sbin/iptables');
+ static $iptables;
- if (!$iptables || !file_exists($iptables)) {
- $this->jerr("iptables could not be found.");
+ if (!$iptables) {
+ require_once 'System.php';
+
+ $iptables = System::which('iptables', '/sbin/iptables');
+
+ if (!$iptables || !file_exists($iptables)) {
+ $this->jerr("iptables could not be found.");
+ }
}
// this should have been set up already..
// in the base firewall code.
function updateTables()
{
- require_once 'System.php';
-
- $iptables = System::which('iptables', '/sbin/iptables');
+ static $iptables;
- if (!$iptables || !file_exists($iptables)) {
- $this->jerr("iptables could not be found.");
+ if (!$iptables) {
+ require_once 'System.php';
+
+ $iptables = System::which('iptables', '/sbin/iptables');
+
+ if (!$iptables || !file_exists($iptables)) {
+ $this->jerr("iptables could not be found.");
+ }
}
// this should have been set up already..
// in the base firewall code.