How to change default settings in the image?

Discussion in 'Tomato Firmware' started by Windy, Apr 10, 2013.

  1. Windy

    Windy Networkin' Nut Member

    I would like to build an image with some default settings changed as well as files added so that if someone near the router presses the reset button (by accident or on purpose), it can restore back to a state where I could still maintain it remotely. I already understand how to build custom images, but I am not sure what I need to do to change default settings (in nvram or in file?) as well as adding own files to the image. Does anyone know how it can be achieved?

    Here are some examples what I would like to accomplish:
    - Enable remote access and change DDNS settings
    - Change default router IP from to something else
    - Add/remove page/CSS contents to the web server
    - Bundle own compiled programs to run whenever router is turned on
  2. Toastman

    Toastman Super Moderator Staff Member Member

    defaults are set in release/src/router/nvram/defaults.c

    it should be easy now u know where to look.

    The rest of it, perhaps someone else will have time to give u a tutorial.
  3. Windy

    Windy Networkin' Nut Member

    Thank you! I cannot believe I have missed something so obvious.

    As for the rest, any info would be great! I am just looking for the folder that would be included/copied in the build process, and/or a hint of the source code/script that is responsible for assembling the files together. I do not think I would need a step-by-step guide unless you are implying it is complicated...
  4. Monk E. Boy

    Monk E. Boy Network Guru Member

    Remote access, IP address, DDNS, and even startup programs (scripts->init/firewall/wanup) should be configured through nvram settings. So you're most of the way there already.
  5. Windy

    Windy Networkin' Nut Member

    You're right. I just have to figure out where to put the "startup programs" in the image so they could be found by the scripts.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice