Output bsdlabel -A diagnostics as well
Output all slice information prior to upgrade, after dd operations and the final.
Output logs to /conf/
revert
Use COMPLETE_PATH
Sleep for 10 seconds before rebooting and allow disks to catch up
Mount RW when script launches
Send log file to /conf/
Add bit when restoring for diagnostics
Alert when we are doing a NanoBSD style upgrade.
Mount RW so we can write to logs. Duh. Mount RO if we exit out of an upgrade.
Copy host /etc/fstab to newly created area
If anything goes wrong when updating fstab then abort the upgrade and file a notice.
Use GLABEL_SLICE
Add a function named file_notice which invokes the php version.
Just for kicks I tried to use a full upgrade file instead of a file labaled upgrade. Bad things hapeppened. Prevent this in the future and error out and file a notice when this is attempted and give a hint that a file namebed "upgrade" must be used.
Use gzcat
s/config/conf/
Oops use /config/
Reinstall packages after upgrade
Use OLD_UFS_ID when replacing the old fstab entry (needs to be 0 or 1, not 1 or 2). Confusing!
Use UDS_ID when updating fstab
Use gpart to set the active partition slice
Turn off foot shooting when we are done.
Fix diagnostics text
use GLABEL_SLICE
umount correct slice. cleanup code and add log for normal upgrade too
Use '' since we are already in a ""
Output ls -lah /dev/ as well
Oops, add spacer before command name output
Add some extra diagnostics which might help diagnose an upgrade problem after the fact
Do not append variable
Move stray |Write out log to /cf/upgrade_log.txt so we can see the upgrade log after reboot
Use correct names. Mount correct directory and modify fstab
Check for pfsense and not pfsense1
Foot shooting is fun. Add some debugging echos to logger
When running fsck_ffs to check the validity of the upgrade, check ${TOFLASH}a
Out image to the slice and not a
Use REAL_BOOT_DEVICE
Set slice as well
Add my (C) since I have rewritten large portions of this file. Remove firmware lock if we exit before doing an upgrade.
Operate on real devices instead of glabels
Output more text
Output everything for debugging. Do not sleep.
No need to remove firmware.lock twice
Mount $TOFLASH and check for post upgrade command
Stop sleeping
Pre_upgrade commands not supported ATM on nanobsd upgrades
Reboot after upgrade and do not check for /tmp/ file which will never be able to be set.
Exit on failure
No need to \" in this case
/root/pfsense/
rename root0 and root1 pfsense0 and pfsense1
Remove copy-and-pasted code. Add globals.inc, too we need to define $g
Add support for nanobsd upgrades
Use updatep1 from /root/
Oops, zcat not cat the nanobsd update file
Let update1 handle file modifications
Add pfSenseNanoBSDupgrade upgrade routine
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