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

scripting guide

Discussion in 'Tomato Firmware' started by besonen, Aug 6, 2008.

  1. besonen

    besonen LI Guru Member

    i'd like to understand the nuances of tomato scripting.

    i'm not in front of a tomato router at the moment, does tomato use the native busybox or the ash shell?

    does a guide exist that describes tomato scripting? and/or is there a document that at least describes the nuances of tomato scripting?
     
  2. TexasFlood

    TexasFlood Network Guru Member

    If you find one, I'd like to read it to, :biggrin:

    There is some guidance in the Tomato FAQ.

    I've done some simple scripts to get specific things done. In my mind, there are a few different aspects which are separately documented.

    sh / ash scripting which you can google up multiple tutorials on. With Tomato the shell appears to be busybox ash whether you call it as sh or ash as both of these are linked back to busybox. Most of the linux commands are provided by busybox and documentation can be found by running "--h" after most commands or googling busybox & linux.

    See the Tomato FAQ for the different script tabs and when they run.

    As suggested in the Tomato FAQ, "wl, nvram, ttcp, iptables, & top are "interesting commands to play with". wl, for example, has a large number of sub-commands to access wireless options. nvram is used to read and set nvram stored variables. iptables is the firewall, etc. Go have a look in /bin, /usr/bin, /sbin, and /usr/sbin to see the availble commands. Most of these are links, there are only a few actual executables there, but it gives you a good idea of what you have to play with.
     

Share This Page