[nas-2000] Re: how to grab the power-button?

  • From: philipp Wehrheim <flipstar@xxxxxxx>
  • To: nas-2000@xxxxxxxxxxxxx
  • Date: Sat, 17 Nov 2007 12:52:21 +0100

Hey Felix,

as always I'm not at home over the weekend.
So the infos below are just some wild guesses!

Felix Mellmann wrote:
> Hey guys,
> my nas-1000 runs with a debian system from hdd, so i had to exchange
> some parts of the flash.
> I know, that the originial system was able to shutdown the system
> whenever someone pushes the power-button. Okay since debian does not get
> that information, it keeps running, but one of the leds flashes and
> after 30 seconds, the nas shuts down itself, leaving the filesystem in
> an unconsistent state. So I have to use a remote "slogin root@nas halt"
> for system halt.
> In /sys/class/misc there are two devices listed - sl_pwr and sl_gpio
> (aka /dev/sl_pwr and /dev/sl_gpio).
> Does anyone know if those devices return the push on the power-button,
> and how to use it?

In the start script /etc/rc somewhere a daemon "powermgmt" is started.
I would recon to use string and/or strace to look inside.

Ofcourse you can create the two dev's in your debian root if the above
prog is responceable and execute it there.

> In the meantime I think I will try to open one of those devices and
> print on the console what they return, but I fear, that I will have to
> use ioctl's ...

Will you tell us what you did to get debian to work and
if you had success with the powerbutton what was needed too.

> thank you in advance,
> Felix

Other related posts: