Remove lock hold later on
Correct ordering, use a lock file. Launch upgrade in bg and look for lock file to guess if upgrade is in progress
Add pre_upgrade_command hook support
Restore to 1.2-RELEASE file.
Revert rc.firmware to a known working state now that the builderprocess is a bit more sane.
Latest round of fixes
Remove .tar file if it exists before extracting.
Correctly install files.
Do not pass z flag to tar. The item is now gzipped.
Remove firmware image once completed
Uncompress archive before tarring it. This avoids compression seek slowdowns
Suggested-by: cmb
chflags noschg file before rm
Remove exec statement
Missing /
Use install when upgrading.
Unlink upgrade file on upgrade.
Remove configuration lock that would be acquired when you login to ssh after a firmware update.
Ticket #1258
Run /tmp/post_upgrade_command after update if it exists
if the update firmware unpacks /tmp/no_upgrade_reboot_required then do not reboot after update.
Redirect scripts output to /tmp/firmware_update.log
Do not process custom image unless it really exists.
Before it was detecting an image of "" and triggering the -C error.
Switch to cd / && tar instead of -C to avoid:
tar: Error opening archive: Failed to open '-C': No such file or directory
Echo to WALL when upgrades begin
Cleanup upgrade script
Thanks to Dario for helping!
Do not run end of upgrade commands all the time. Only run after an upgrade.
Do not create /ftmp ram disk. We are using /tmp at the moment.
if /etc/init_bootloader.sh exists, run this after upgrade. This will be the original bsdlabel command that was run.
Mount RO at the end of the file
call sync before umounting
unmount / after upgrade
use "/sbin/mount -w -o noatime /" to mount / on upgrade.
for some reason calling php from this script is very problematic. workaround this for now.
Do not redirect console.
Do not process non-existant /sys
Correct path to chflags
Remove /var/run/firmware.lock after upgrad
Mount as rw during update.
Sanity check
Convert to for loops
Do not touch /boot/
Purge savecore directory after upgrading
Seek out and destroy CVS directories. DIE!
Make sure /etc/rc.conf and /etc/motd don't sneak in.
rc.subr is used by pcmcia facilities
Remove /etc/rc.subr and /etc/rc.d after upgrade if it exists. We have our own rc process.
Send mtree output to syslog
Hide warning messages
Shell rc.reboot
Use complete path to mtree
Don't reboot after a firmware update - this is impractical with the new update structure.
Ensure proper /etc/hosts symlink after upgrade
Only chmod user, not groups.
Restore flags before unmounting /cf
run remove_chflags before upgrading.. they will be restored by the tgz
(#15) Use rc.reboot when rebooting and don't try to remove auto_upgrade_in_progress.
Correct installed typo
Add debugging lines. For some reason tar is not being invoked even though the if section is being invoked.
Use /tmp/bdiff.log instead of /tmp/errors.
We had three cases doing the same thing :P
Require an argument to be passed to the binary update function rather than defaulting to /tmp/latest_* - we're no longer using a single file for updates.
quiet down upgrade system a little
oops, not sure how I missed the 'v' - needed to create right output for egrep and nawk :)
no need to create full path to output file, just dump it in /tmp/patched
correctly ignore directoriescompare md5's against the right variables
comments
and cleanup
split out directories for sanities sake
we're working in /tmp/patched.
change order of bspatch and don't cd to /tmp/patched, /tmp is fine
fix the tar, move bspatch where it belongs
A little cleanup of the new firmware upgrade code
Remove contents of /tmp/patched/ on each pass
Add missing `
Turn binary_update item into a callable shell function
bsdpatch downloaded .tgz files from the new auto upgrade system
Add $Id$ tags
If /tmp/custom.tgz exists, allow it to overwrite the upgrade. This can be useful if you do not wish to upgrade a certain part of pfSense.
Log upgrade actions to syslog.
Add auto upgrade option to pfSense
make sure to unlink first during tar operations
Introduce an easy way to upgrade firmware for pfSense.
Initial revision