Unlock kernel package to make dry-run output more consistent
Reboot after upgrade when meta package version changed
Reduce values of FETCH_TIMEOUT and FETCH_RETRY to help ticket #6177
Setup HTTP_PROXY environment variable for pkg when it's called from the GUI and also for pfSense-upgrade
Silence /etc/rc.notify_message garbage output
(cherry picked from commit eb3491d99e939ab21d84122ededf9e7e9462ed71)
Fix code used to read config repo path
(cherry picked from commit e429ac7134ac2080af9117c11e2f294d4dd8c5d0)
Do all steps to replace repo package and make sure symlink is in place
(cherry picked from commit 5caee0ba0f8782ea7bf1df54ad0848da1d5084d2)
Force update after reinstall repo pkg
(cherry picked from commit 3e7c1ea74a8c0600c785e9588349afd927719d23)
Simplify logic
Make sure directory exists
(cherry picked from commit cc1b7ddd0ba2d7eee6ee7ec1cae83efda91427d0)
Make sure source file exists
Add a workaround on pfSense-upgrade to make sure repo package is replaced by correct one
(cherry picked from commit a491ec98d8ffc5663cca84df402c2d6274a78a07)
Rework the way repo packages work
- Distribute only a single pfSense-repo package containing all templates- Create a symlink pointing to selected repo- Do not limit it only to pfSense-repo and pfSense-repo-devel
(cherry picked from commit a90f1c9b12c4d31ea845fa04188e599ba28dbaf1)
Do not return -1, sh doesn't like it
(cherry picked from commit a35bf546b57558535e3fc1958cf3fb2b4d18ade7)
Make sure repo metadata is updated before any other package when repo conf changes. Fixes #6052
(cherry picked from commit 78aee67a9e8ddb40d10c965ee8ce1ad1389d25f6)
Use PHP CLI explicitly to run rc.conf_mount_r(w|o) from pfSense-upgrade, it fixes #5875
Fix #5837
Since the introduction of pkg_with_pb(), direct calls to this functionwere added using the following format:
if ! pkg_with_pb ... | tee -a $logfile; then
What happened in this case is if was always getting a successfullreturn code from tee call, and pkg_with_pb return was always being...
Fix #5831 using a simpler approach, just setting REPO_AUTOUPDATE=false when it's booting
Revert "Fix #5831"
This reverts commit 93a8ddf7a4c5d43cbeb623c923eb76659e6f49e0.
Save pkg call return code to use on return. The way it is now is always returning 0. It should fix #5837
Make additional packages install/delete operations to respect -n (dry-run)
Reorder pkg_reinstall_all(), no functional changes
Respect ALL_PACKAGES for package removal
Fix #5831
After PKG_AUTOUPDATE=false was removed, operations done during boot,2nd and 3rd stages of upgrade process, are trying to update repositorymetadata. The problem is during this stage we don't have a networkavailable yet and all needed packages were previously downloaded....
Test duplicated slice with fsck after cloning during an upgrade
Make sure LANG = C for pkg calls
Change pfSense-upgrade to return time for reboot so GUI can use it
Do not set PKG_AUTOUPDATE=false anymore and let pkg to update metadata when it's necessary. Some users reported to see issues in cases where update was necessary
Only ask Proceed with upgrade question once
On nanoBSD there is a "Proceed with upgrade?" question warning about the duplicate slice. After answering "y" to that, the system does the duplicate slice, which takes some minutes. Then it asks again "Proceed with upgrade?" after displaying all the packages it will install....
Fix #5598 - Nanobsd upgrade fails on GUI
When -p is used on nanobsd, progres socket must be created on secondarypartition (chroot_dir) otherwise pkg, that runs with -c chroot_dir,will not be able to find UNIX socket to connect and send events
Track nc PID and kill it on _exit()
pfSense-upgrade script text
Just a few extra words to put in this text, while I am reading it and waiting for the upgrade to complete.
Remove extra )
Implement -n (dry-run) option in pfSense-upgrade
Use _exec() to call gitsync
Teach pfSense-upgrade to run gitsync after upgrade
Define user-agent on pfSense-upgrade
Duplicate slice before upgrade, fixes #5483
Add a workaround on pfSense-upgrade to prevent breaking strongswan port due to the symlinks we create
Improve language
Fix copyright year
Fix spell issue spotted by Jim
Add a new option to force upgrade script to don't reboot
Wait 10 seconds before reboot, also notify admin
Do not consider only meta package, but also other pfSense main packages, also change exit code from -1 to 2
Add a new option to pfSense-upgrade, -c, it'll return 0 if system firmware is up2date or -1 if there are updates available
Fix case wildcard of package names for reinstallall
Introduced by https://github.com/pfsense/pfsense/commit/e3b43e4bfe5a3e69028c1ab7e0e4a632ff5ee499None of the packages were being matched here, none of them would be reinstalled. A "reinstallall" would complete very quickly with "Success" message but actually do nothing.
Ignore kernel-debug package when looking for main kernel package
Make it possible to _exec to get $_cmd exit code instead of tee one
Use _exit()
Fix #5338: Add -4 and -6 options to pfSense-upgrade to select IP protocol version
Use already defined pkg_prefix variable
Use _echo, not echo
Fixed #5291 - Reinstalling pfSense-pkg-openvpn-client-export
Removed debugImproved package detection
Added "reinstall all packages" functionality (accessed via diag_backup.php)
Use a socket to talk with pkg and write json file to GUI
Move kill tail process to _exit()
pfSense-upgrade revised to kill tail on exitpkg_mgr_install.php revised to catch json deocde error on partial lines read from file
Remove old logfile before start
Add quotes
Do not accept blank logfile
Change -l parameter to receive a complete path for logfile
_force must be local
Do not stop when package is up to date and force flag was passed
Add -f option to force package reinstallation
When -p is used, read fifo content and write it to a file used by GUI
Respect chroot_dir, ticket #5300
Ticket #5300:
Add a workaround to fix the issue of extensions.ini out of order endingup breaking PHP. Since the only dependency we have is suhosin thatdepends of session, alphabetical sort does the trick for now while aproper solution is not handled by the ports tree
Preparation for $5279New wrapper script to be called by web GUI
Rework pfSense-upgrade script to make it work with nanobsd
Exit script when _exec fails
Call /etc/rc.reboot in bg and exit just after that
Let user know it's going to reboot if any package of core repo needs upgrade
Check if packages are up to date early
Make sure partition are mounted in rw mode before any operation
Only reboot if there are upgrades from core repo
Remove unnecessary variable
Remove more cases of hard coded pfSense and use product_name
pkg 1.6.x upgrade command called with -q is now respecting it
Do not run pkg update between first and second step of upgrade process
Remove old references to undefined variable firmwarelock
Call exit after detect another instance is already running, otherwise it would end up deleting pid file
Detect when pkg must be upgraded and do it early, followed by a pkg update to make sure metadata is updated
Cleanup cache and stale packages after install/delete
Add missing ;;
Fix logic to set EVENT_PIPE
Add -h, to show help
Define EVENT_PIPE using a parameter, -p
Print return code when _GUI_CALL is not empty, used by GUI to check rc of a process that runs in bg
Replace direct calls to exit by _exit
Set environment var EVENT_PIPE, used by pkg to write out progress in json format
Rename functions and variables to improve readability, no functional changes
Use compare_version() for kernel_pkg checks
Add pfSense-upgrade parameters -i/-r to install or remove packages
Change usage() to use regular echo() and print to stderr
Relocate global variables definitions, no functional changes
Relocate main block and leave all functions in the beggining
Check if update needs to run inside update()