diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-12-25 13:04:28 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-12-25 13:04:28 -0500 |
commit | b2dd7ab44d6520d9bc32f580d9744b5a3dc2f6f3 (patch) | |
tree | 31d9e3071d68775ffea7e97608852cff3c33d807 | |
parent | 7102210a078b3865f701054a3de5a8cf2a0ce8dd (diff) | |
download | pfsense-b2dd7ab44d6520d9bc32f580d9744b5a3dc2f6f3.zip pfsense-b2dd7ab44d6520d9bc32f580d9744b5a3dc2f6f3.tar.gz |
Only backup libraries at the beginning of the deinstall cycle.
-rw-r--r-- | etc/inc/pkg-utils.inc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index bffe016..b7f4d6d 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -828,10 +828,12 @@ function delete_package_xml($pkg) { conf_mount_rw(); - // Back up /usr/local/lib libraries first - $static_output .= "\tBacking up libraries... "; - update_output_window($static_output); - exec("/usr/bin/tar czPf /tmp/pkg_libs.tgz `/bin/cat /etc/pfSense_md5.txt | /usr/bin/grep 'local/lib' | /usr/bin/awk '{ print $2 }' | /usr/bin/cut -d'(' -f2 | /usr/bin/cut -d')' -f1`"); + if(!file_exists("/tmp/pkg_libs.tgz")) { + // Back up /usr/local/lib libraries first + $static_output .= "\tBacking up libraries... "; + update_output_window($static_output); + exec("/usr/bin/tar czPf /tmp/pkg_libs.tgz `/bin/cat /etc/pfSense_md5.txt | /usr/bin/grep 'local/lib' | /usr/bin/awk '{ print $2 }' | /usr/bin/cut -d'(' -f2 | /usr/bin/cut -d')' -f1`"); + } $pkgid = get_pkg_id($pkg); if ($pkgid == -1) { |