How to get firmware version from a script

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

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?
 

RMerlin

Asuswrt-Merlin dev
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.
 

Latest threads

Sign Up For SNBForums Daily Digest

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