diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 21:34:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-04-30 21:34:56 +0000 |
commit | cf577b5ab0e98b0a678086ead99d5e6355a58f25 (patch) | |
tree | 328e07b2364b611165e2cdcb55184c9dc05cc2ee | |
parent | 4303fbff5e9e36e5c140a97ca9af1751b647c0b5 (diff) | |
download | pfsense-cf577b5ab0e98b0a678086ead99d5e6355a58f25.zip pfsense-cf577b5ab0e98b0a678086ead99d5e6355a58f25.tar.gz |
Delete package before reinstalling to avoid multiple service entries, etc.
-rw-r--r-- | etc/inc/pkg-utils.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 54d8e18..50ec813 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -268,6 +268,7 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { require_once($include_file); } else { log_error("Could not locate {$include_file}."); + delete_package($package['name']); install_package($package['name']); } } @@ -287,6 +288,7 @@ function sync_package($pkg_name, $sync_depends = true, $show_message = false) { if(!file_exists("/usr/local/pkg/" . $item)) { file_notice($package['name'], "The {$package['name']} package is missing required dependencies and must be reinstalled.", "Packages", "/pkg_mgr_install.php?mode=reinstallpkg&pkg={$package['name']}", 1); log_error("Could not find {$item}. Reinstalling package."); + delete_package($pkg_name); install_package($pkg_name); } else { $item_config = parse_xml_config_pkg("/usr/local/pkg/" . $item, "packagegui"); |