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()
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