summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2014-02-18 11:33:59 +0000
committerErmal <eri@pfsense.org>2014-02-18 11:33:59 +0000
commit6d43e1f2e61e91ff49ac18f0094dc318a53133e4 (patch)
treecf564f8e551c7e6d12168e3e0fda862cef21364a /etc
parent248b0124e423b268d698d1e7246ea36df75a34e7 (diff)
downloadpfsense-6d43e1f2e61e91ff49ac18f0094dc318a53133e4.zip
pfsense-6d43e1f2e61e91ff49ac18f0094dc318a53133e4.tar.gz
Check if the package is installed before deleting opteration is started
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/pkg-utils.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 924f223..a5a199d 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -384,7 +384,8 @@ function uninstall_package($pkg_name) {
}
}
}
- delete_package_xml($pkg_name);
+ if (is_package_installed($pkg_name))
+ delete_package_xml($pkg_name);
$static_output .= gettext("done.") . "\n";
update_output_window($static_output);
@@ -578,7 +579,7 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
function install_package($package, $pkg_info = "", $force_install = false) {
global $g, $config, $static_output, $pkg_interface;
- /* safe side. Write config below will send to ro again. */
+ /* safe side. */
conf_mount_rw();
if($pkg_interface == "console")
OpenPOWER on IntegriCloud