diff options
author | Renato Botelho <garga@FreeBSD.org> | 2017-04-24 15:08:31 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2017-04-24 17:06:42 -0300 |
commit | 33545c0a3e125a1a09aac5686497f1f69af5c7b1 (patch) | |
tree | 7c3c2c3563a84cb4805dc812a73b0fc51b05e19a | |
parent | b59e4e52b9f7b0389d8c60ce4a08fbe2b3aed8ad (diff) | |
download | FreeBSD-ports-33545c0a3e125a1a09aac5686497f1f69af5c7b1.zip FreeBSD-ports-33545c0a3e125a1a09aac5686497f1f69af5c7b1.tar.gz |
Lock packages when it's necessary
-rwxr-xr-x | sysutils/pfSense-upgrade/files/pfSense-upgrade | 6 |
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="" |