CLI Upgrade Firmware
Problem
Upgrading firmwares via the web UI is tedious, especially when you have 50 or 60+ of these fuckers to do.
Solution
You have to do this via tftp. This involves setting up a tftp server and making sure the appropriate firmware is A) loaded on it and B) available through it. (This is left as an exercise for the reader.)
# execute restore image tftp <filename> <tftp_ipv4>
The FortiGate unit uploads the firmware image file, upgrades to the new firmware version, and restarts. This process takes a few minutes.
Rancid?
Why, yes:
$ fnlogin -c 'execute restore image tftp FGT_100D-v5-build1165-FORTINET.out 1.2.3.4
y' 172.30.1.92
This won't work if you are downgrading because there's an extra 'y' that has to be fed to the system to make it work. It does work if you are merely reloading the same version of the firmware that's already running even though it will tell you it is "downgrading".