summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-07-15 21:46:11 +0000
committerErmal Luçi <eri@pfsense.org>2009-07-15 21:46:11 +0000
commitada518396de53e342a2dae3a2b7268ad56bea89f (patch)
treed9c9b79c88cb8fd7ec190daa557f0df10fcb4126 /etc
parente33ab5d037f9f063e4e428d8396e9f78f863f490 (diff)
downloadpfsense-ada518396de53e342a2dae3a2b7268ad56bea89f.zip
pfsense-ada518396de53e342a2dae3a2b7268ad56bea89f.tar.gz
Be smarter at it and reduce some overhead.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc25
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) {
OpenPOWER on IntegriCloud