diff options
author | Renato Botelho <renato@netgate.com> | 2015-09-29 14:12:34 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-09-29 14:12:45 -0300 |
commit | b6c72ae2c3c3d366e0dafe7337a8b2c4738df8ac (patch) | |
tree | 74dfdc87c719b77be519de52ec994dc7808c16ed | |
parent | 1818df8bf0d1889880cf5d3d18435348f8510946 (diff) | |
download | pfsense-b6c72ae2c3c3d366e0dafe7337a8b2c4738df8ac.zip pfsense-b6c72ae2c3c3d366e0dafe7337a8b2c4738df8ac.tar.gz |
Detect when pkg must be upgraded and do it early, followed by a pkg update to make sure metadata is updated
-rwxr-xr-x | src/usr/local/sbin/pfSense-upgrade | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade index c30f257..9f22bd2 100755 --- a/src/usr/local/sbin/pfSense-upgrade +++ b/src/usr/local/sbin/pfSense-upgrade @@ -138,6 +138,11 @@ pkg_upgrade_first_step() { _exit 1 fi + if [ "$(compare_pkg_version pkg)" = "<" ]; then + _exec "pkg upgrade pkg" "Upgrading pkg" mute + pkg_update force + fi + kernel_version_compare=$(compare_pkg_version ${kernel_pkg}) if [ "${kernel_version_compare}" = "<" ]; then |