What's new

How to get firmware version from a script

sbsnb

Very Senior Member
I automate the task of backing up my router's config, JFFS, and Entware. I would like to also include the firmware version in the backup. I know it's in NVRAM stored as 3rd-party=merlin and innerver=3.0.0.4.386.2_6, which requires a little bit of script-fu to turn into a string like "Merlin-386.2_6."

Instead of reinventing the wheel I tried investigating how it's done for the page headers in the GUI, but that proved to be more difficult than I had imagined.

Any tips on where to look?
 
Don't use either of these. First one is not guaranteed to always exist (it's used by one internal service in newer versions), and the second one is used internally for, I believe, the update system. What you need is in the buildno and the extendno variables.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top