diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-06-23 11:11:29 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-06-23 11:11:45 -0400 |
commit | efea79691de94e696b97c2c4092eaf07c350882e (patch) | |
tree | 3af4f63753fdab82b583f58ab723a9df62645fd2 /etc | |
parent | e0ed1aa3bdb7f4ade846500caf936d082aff01d0 (diff) | |
download | pfsense-efea79691de94e696b97c2c4092eaf07c350882e.zip pfsense-efea79691de94e696b97c2c4092eaf07c350882e.tar.gz |
Backup rrdtool binaries during package reinstallation. Currently that is the onlyp package that can be clobbered by others. We will rework this completely in a future version when we adopt PBIs.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/pkg-utils.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 660d442..a5ced57 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -321,6 +321,7 @@ function uninstall_package($pkg_name) { $static_output .= "Backing 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`"); + exec("/usr/bin/tar czPf /tmp/pkg_bins.tgz `/bin/cat /etc/pfSense_md5.txt | /usr/bin/grep 'rrdtool' | /usr/bin/awk '{ print $2 }' | /usr/bin/cut -d'(' -f2 | /usr/bin/cut -d')' -f1`"); $static_output .= "\n"; } } @@ -345,7 +346,9 @@ function uninstall_package($pkg_name) { $static_output .= "Cleaning up... "; update_output_window($static_output); exec("/usr/bin/tar xzPfU /tmp/pkg_libs.tgz -C /"); - @unlink("/tmp/pkg_libs.tgz"); + exec("/usr/bin/tar xzPfU /tmp/pkg_bins.tgz -C /"); + @unlink("/tmp/pkg_libs.tgz"); + @unlink("/tmp/pkg_bins.tgz"); } } @@ -1190,4 +1193,4 @@ function pkg_reinstall_all() { } } -?> +?>
\ No newline at end of file |