diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-07-15 16:38:45 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-07-15 16:38:45 +0000 |
commit | b0ec358d108f30150eb089f011f74958cd5d95a3 (patch) | |
tree | 76a5198c2b2cd98a1d96f43086a1c0ef225643ae | |
parent | ea9828af72057cf71976f7180dcf060a8a3dbb6d (diff) | |
download | pfsense-b0ec358d108f30150eb089f011f74958cd5d95a3.zip pfsense-b0ec358d108f30150eb089f011f74958cd5d95a3.tar.gz |
Remove files before recreating them. Add filter rules early content to the file it was missing.
-rw-r--r-- | etc/inc/pkg-utils.inc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 80cbb8d..c283162 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -990,12 +990,21 @@ function squash_from_bytes($size, $round = "") { function pkg_build_filter_rules() { global $config, $g; + $pkgrules = ""; $pkgrulesearly = ""; $pkgnatrules = ""; $pkgnatrulesearly = ""; $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.rdr.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) { @@ -1026,8 +1035,10 @@ function pkg_build_filter_rules() { 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); + file_put_contents("{$g['tmp_path']}/rules.packages", $pkgrules); if ($pkgrdrrules <> "") file_put_contents("{$g['tmp_path']}/rules.rdr.packages", $pkgrdrrules); if ($pkgrdrrulesearly <> "") |