User Tools

Site Tools


The Hardware Button of the NSLU2

The NSLU2 has a hardware power on-/power off-button. nslu2_front_resized.jpg

As any other hardware button, its function can be configured in OpenWrt. In order to use the hardware button of the NSLU2 to shut it down/ switch if off, follow the steps below:

Configuration Steps

1. edit /etc/inittab

add the following line to the /etc/inittab


The file /etc/inittab (running 8.09.2 without having made manual adoptions) should then look like this:

::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K stop
tts/0::askfirst:/bin/ash --login
ttyS0::askfirst:/bin/ash --login
tty1::askfirst:/bin/ash --login

2. create a file including the commands below and save it under /bin

on the console type

root@nslu2:~# touch /bin/
vi /bin/

and enter the following lines of code

#!/bin/sh /etc/rc.common
/etc/init.d/rcS K stop

These lines first stop all running services and then shut the NSLU2 down.

Finally, make the file /bin/ executable by

chmod 750 /bin/

You are done. After a reboot you should be able to use the power off-button.

Sources (in german)

Further information on the NSLU2 can be found here: Linksys NSLU2

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
toh/linksys/nslu2/nslu2.hardware.button.txt · Last modified: 2018/06/01 12:31 by tmomas