Command to shut down...?

Discussion in 'Tomato Firmware' started by dissident, Sep 13, 2008.

  1. dissident

    dissident LI Guru Member

    I'm looking for an SSH command to "shut down" my Tomato-based router. I'm aware of the /sbin/halt command, but that's not what I'm after (I don't think). I simply want a way to make Tomato shut down cleanly prior to my powering everything off at the UPS. Advice would be appreciated.
  2. TexasFlood

    TexasFlood Network Guru Member

    Near as I can tell, halt does do a "clean" shutdown, sans -n & -f flags at least.
  3. fyellin

    fyellin LI Guru Member

    Well, when you hit the shutdown button from the web interface, it pretty much just does kill -SIGQUIT 1, which is exactly what /sbin/halt does. So there's no reason you should be scared of the halt command.

    You're making the mistake of thinking that Tomato has an actual file system that could get corrupted. Everything that's not in ROM or NVRAM gets wiped out when the machine is shut down. The entire writeable file system is rebuilt from scratch at start up.
  4. dissident

    dissident LI Guru Member


    I'm not making that mistake; I just want to make sure my shutdown scripts run, and that the bandwidth logs are written to the CIFS share as they should be, upon shutdown.

    Thanks for the info!
  5. TexasFlood

    TexasFlood Network Guru Member

    FYI, I just ran a test to double check. I put a line on the shutdown script tab using the 'touch' command to create a test file on a cifs share then ran the 'halt' command. The file was created indicating that the shutdown script ran as I suspected it would.
  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