roback.cc

the website of joe roback

Joe Roback

DD-WRT: Shutdown script using Optware the Right Way

Ever want to shutdown your home router running DD-WRT with Optware the Right Way and correctly unmount any USB drives. Well DD-WRT doesn’t have a halt or a shutdown command, only reboot, but you could easily put the router a state that is safe to just pull-the-plug. Just create a shutdown script, say called /opt/local/bin/shutdown and put the following inside:

#!/bin/sh
/opt/etc/init.d/optK

Then make the script executable my changing the permissions.

chmod 755 /opt/local/bin/shutdown

Now as long as /opt/local/bin is in your current path, you can just type shutdown to cause Optware to initiate its shutdown sequence. When it finishes, you can simply power down the router without worry about your filesystems on your external disks.

Tags: , ,

Leave a Reply