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

How to run init script manually?

Discussion in 'Tomato Firmware' started by tido, Mar 28, 2012.

  1. tido

    tido Networkin' Nut Member

    Hi Folks,

    Is it possible to run the init script manually from the CLI? If so what would be the steps?

    Cheers,
     
  2. mstombs

    mstombs Network Guru Member

    Login via telnet/ssh and give the command

    Code:
    /tmp/script_init.sh
     
  3. tido

    tido Networkin' Nut Member

    Hey mstombs,

    Thanks for the reply, the script is not actually located in the folder you have indicated. Is there a way to search the whole file structure for the "script_init.sh" file?

    Cheers,
     
  4. koitsu

    koitsu Network Guru Member

    Are you absolutely certain the script you're trying to run is under Script -> Init in the GUI?

    Script -> Init gets written as /tmp/script_init.sh
    Script -> Firewall gets written as /tmp/script_fire.sh
    Script -> Shutdown gets written as /tmp/script_shut.sh
    Script -> WAN Up gets written as /tmp/script_wanup.sh

    If there is no /tmp/script_init.sh, then something is amiss with your system. Please provide the exact TomatoUSB version/firmware you're using, and output from the following command via the CLI: nvram show | egrep ^script_ (note the underscore on the end of the command).
     
  5. mstombs

    mstombs Network Guru Member

    If you are looking for the router built-in startup code - it's compiled C in RC routines not shell script so you have to look in the source not the binary. There must be ways to do soft reboot and re-run al the init sequence, certain web gui commands do trigger that - so if you do add your own init scripts via the gui you must consider what happens if the script runs multiple times...
     

Share This Page