diff options
author | Colin Smith <colin@pfsense.org> | 2005-06-12 18:16:08 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-06-12 18:16:08 +0000 |
commit | 644d2d59b4739e06d1235869d348a2cf28ead843 (patch) | |
tree | c2ac99ae16afbe54ae38cd1d71ef0cda0f93c002 /etc/inc/pkg-utils.inc | |
parent | 4082f394fa5942c7e87db47dd25b97338962d793 (diff) | |
download | pfsense-644d2d59b4739e06d1235869d348a2cf28ead843.zip pfsense-644d2d59b4739e06d1235869d348a2cf28ead843.tar.gz |
Don't attempt to run package deinstall commands if the package XML hasn't been parsed (or it doesn't exist).
Diffstat (limited to 'etc/inc/pkg-utils.inc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 485d3e5..5ba7948 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -675,10 +675,15 @@ function delete_package_xml($pkg) { $static_output .= "done.\n"; update_output_window($static_output); } + /* deinstall commands */ + if($pkg_config['custom_php_deinstall_command'] <> "") { + $static_output .= "\tDeinstall commands... "; + update_output_window($static_output); + eval($pkg_config['custom_php_deinstall_command']); + $static_output .= "done.\n"; + update_output_window($static_output); + } } - /* execute the deinstall command if it exists */ - if($pkg_config['custom_php_deinstall_command'] <> "") - eval($pkg_config['custom_php_deinstall_command']); /* remove config.xml entries */ $static_output .= "\tConfiguration... "; update_output_window($static_output); |