diff options
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index ae6e0d5..551e2d0 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -998,13 +998,6 @@ function pkg_build_filter_rules() { $pkgrdrrules = ""; $pkgrdrrulesearly = ""; - @unlink("{$g['tmp_path']}/rules.natearly.packages"); - @unlink("{$g['tmp_path']}/rules.nat.packages"); - @unlink("{$g['tmp_path']}/rules.packages"); - @unlink("{$g['tmp_path']}/rules.rdr.packages"); - @unlink("{$g['tmp_path']}/rules.rdrearly.packages"); - @unlink("{$g['tmp_path']}/rules.rulesearly.packages"); - if (is_array($config['installedpackages']['package'])) { run_plugins("/usr/local/pkg"); foreach($config['installedpackages']['package'] as $pkg) { @@ -1031,18 +1024,12 @@ function pkg_build_filter_rules() { } } - if ($pkgnatrulesearly <> "") - file_put_contents("{$g['tmp_path']}/rules.natearly.packages", $pkgnatrulesearly); - if ($pkgnatrules <> "") - file_put_contents("{$g['tmp_path']}/rules.nat.packages", $pkgnatrules); - if ($pkgrulesearly <> "") - file_put_contents("{$g['tmp_path']}/rules.rulesearly.packages", $pkgrulesearly); - if ($pkgrules <> "") - file_put_contents("{$g['tmp_path']}/rules.packages", $pkgrules); - if ($pkgrdrrules <> "") - file_put_contents("{$g['tmp_path']}/rules.rdr.packages", $pkgrdrrules); - if ($pkgrdrrulesearly <> "") - file_put_contents("{$g['tmp_path']}/rules.rdrearly.packages", $pkgrdrrulesearly); + file_put_contents("{$g['tmp_path']}/rules.natearly.packages", $pkgnatrulesearly); + file_put_contents("{$g['tmp_path']}/rules.nat.packages", $pkgnatrules); + file_put_contents("{$g['tmp_path']}/rules.rulesearly.packages", $pkgrulesearly); + file_put_contents("{$g['tmp_path']}/rules.packages", $pkgrules); + file_put_contents("{$g['tmp_path']}/rules.rdr.packages", $pkgrdrrules); + file_put_contents("{$g['tmp_path']}/rules.rdrearly.packages", $pkgrdrrulesearly); $error = ""; $status = mwexec("/sbin/pfctl -nf {$g['tmp_path']}/rules.natearly.packages"); if ($status <> 0) { |