I've been using Tomato on my WRT54GL for some time. I recently decided to start keeping my servers off most of the time and instead use the built in wake-on-lan functionality of tomato. I had previously set up Ubuntu 8.04.1 with wake-on-lan, but there are some minor differences for Ubuntu 8.10 (the Intrepid Ibex).

  1. Install ethtool.
sudo apt-get install ethtool
  1. Add a file to /etc/init.d.
sudo vim /etc/init.d/wakeonlanconfig

The contents of the file should be as follows:

Note the "eth0" used above. If you're using a different interface for wake-on-lan, substitute appropriately.

  1. Configure the file you added in step 2 to run at boot.
sudo update-rc.d -f wakeonlanconfig defaults
  1. Run the file you created in step 2.
sudo /etc/init.d/wakeonlanconfig
  1. Change /etc/init.d/halt so the network interfaces aren't halted when the computer is shut down. At the top of the file, change this line:
NETDOWN=yes

to the following:

NETDOWN=no

That's it! From now on, every time you shut down your computer you can use the WOL interface from Tomato to wake it up.

blog comments powered by Disqus