Change pfSense-upgrade to return time for reboot so GUI can use it
Reverting accidental change
Merge branch 'bugfix-for-4605' of https://github.com/the-real-ed/pfsense
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
Remove all pfSense_MODULE and pfSense_BUILDER_BINARIES definitions, whatever was the reason they were added, it was never finished and it's not being used
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
Changes to accommodate new pfSense-upgrade
Add -f option to force package reinstallation
When -p is used, read fifo content and write it to a file used by GUI
Merge pull request #1963 from davidjwood/ppp-ipv6
Multiple changes to clean up the package installaion system by causing the installer to run in the backgroundwhilst monitoring its output via AJAX to provide a better GUI display.Work in progress !
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
Move ppp-ipv6 helper script into the correct location
Use named variables for ppp-linkup command line parameters
Make route deletions quiet - it may well be the routes have already disappeared
Make code dealing with the IPv4 default gateway conditional on the IPv4 link going down
Connect ppp-ipv6 helper script to ppp-linkdown and ppp-linkup
Further updates to pfSense-upgrade-GUI.sh
Script to set up pfSense-upgrade when called from web GUI
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
Introduce read_global_var:
- Add a new script, read_global_var, that returns the value of any item contained in global array $g- Replace all grep and sed magic from shell scripts
Introduce read_xml_tag.sh
Create /usr/local/sbin/read_xml_tag.sh, that will read a xml tag fromconfig file using xmllint. Replace all direct read using cat, grep, sed,... by this script
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()
Update repository metadata hourly
Add -u option to pfSense-upgrade
- New u option, to run pkg update Move upgrade action code to upgrade()- Rename first_step to upgrade_first_step- Rename second_step to upgrade_second_step- Do not call update when upgrade is called
Verify if pkg is (un)locked before (un)lock it
Disable trap on _exit()
Declare logfile earlier
Make usega() more informative
Teach _exit() to return 1st parameter, replace exit calls by _exit and move trap to start of main block
Track pfSense-upgrade pidfile to avoid running 2 instances simultaneosly
Abort when 'pkg update' fails
Rename upgrade script to pfSense-upgrade
Do not call reboot, use /etc/rc.reboot instead