1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change default settings in the image?

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

  1. Windy

    Windy Serious Server 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 192.168.1.1 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 Serious Server 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 Serious Server 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.
     

Share This Page