summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2017-04-24 15:08:31 -0300
committerRenato Botelho <garga@FreeBSD.org>2017-04-24 17:06:42 -0300
commit33545c0a3e125a1a09aac5686497f1f69af5c7b1 (patch)
tree7c3c2c3563a84cb4805dc812a73b0fc51b05e19a
parentb59e4e52b9f7b0389d8c60ce4a08fbe2b3aed8ad (diff)
downloadFreeBSD-ports-33545c0a3e125a1a09aac5686497f1f69af5c7b1.zip
FreeBSD-ports-33545c0a3e125a1a09aac5686497f1f69af5c7b1.tar.gz
Lock packages when it's necessary
-rwxr-xr-xsysutils/pfSense-upgrade/files/pfSense-upgrade6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysutils/pfSense-upgrade/files/pfSense-upgrade b/sysutils/pfSense-upgrade/files/pfSense-upgrade
index c72f263..d345bf6 100755
--- a/sysutils/pfSense-upgrade/files/pfSense-upgrade
+++ b/sysutils/pfSense-upgrade/files/pfSense-upgrade
@@ -99,7 +99,9 @@ _exec() {
_exit() {
trap "-" 1 2 15 EXIT
- pkg_lock ${kernel_pkg} ${uboot_pkg}
+ if [ -n "${lock_main_pkgs}" ]; then
+ pkg_lock ${kernel_pkg} ${uboot_pkg}
+ fi
if [ -n "${delete_pid}" -a -f "${pid_file}" ]; then
rm -f ${pid_file}
@@ -421,6 +423,7 @@ pkg_upgrade() {
pkg_upgrade_repo
pkg_unlock ${kernel_pkg} ${uboot_pkg}
+ lock_main_pkgs=1
if ! upgrade_available; then
pkg_lock ${kernel_pkg} ${uboot_pkg}
@@ -961,6 +964,7 @@ validate_repo_conf
# Flags used in _exit
export delete_annotation=""
+export lock_main_pkgs=""
export unlock_additional_pkgs=""
export delete_pid=""
OpenPOWER on IntegriCloud