From cc47995dd0b4f7a44c36a94d6f4feabddc418e12 Mon Sep 17 00:00:00 2001 From: Charlie Date: Wed, 8 Jul 2009 14:45:06 +0000 Subject: Add needed code to packages to confirm to 2.0 rules for adding firewall rules. NOTE: other packages might need intervention but for now this is the neccessary minimum to remove dependency on pkg-utils.inc on filter.inc --- config/imspector/imspector.inc | 17 +++++++++++++++++ config/imspector/imspector.xml | 1 + 2 files changed, 18 insertions(+) (limited to 'config/imspector') diff --git a/config/imspector/imspector.inc b/config/imspector/imspector.inc index 09974363..ea4458ce 100644 --- a/config/imspector/imspector.inc +++ b/config/imspector/imspector.inc @@ -104,6 +104,23 @@ //exec('pkg_delete imspector-0.4'); } + function imspector_generate_rules($type) { + + $rules = ""; + switch ($type) { + case 'rdr': + $rules = "# IMSpector rdr anchor\n"; + $rules .= "rdr-anchor \"imspector\"\n"; + break; + case 'rule': + $rules = "# IMSpector \n"; + $rules .= "anchor \"miniupnpd\"\n"; + break; + } + + return $rules; + } + function sync_package_imspector() { global $config; global $input_errors; diff --git a/config/imspector/imspector.xml b/config/imspector/imspector.xml index afdcdcf0..c7595b9a 100644 --- a/config/imspector/imspector.xml +++ b/config/imspector/imspector.xml @@ -218,4 +218,5 @@ deinstall_package_imspector(); + imspector_generate_rules -- cgit v1.2.3