Never Mail me: Hunny Never Mail me: Hunny Never click here!
powered by EUserv
This page is part of my Western Digital My Book World Edition scratch pad.

How to power up and down.

Different ways to switch your box on and off / Funny effects

Some people found their box does not react on the power button anymore.

If you do everything like WD has forseen, the box behaves like this:

But you are a linux guru, aren't you ;-)

You are used to use your session (or wrote some nifty script) and use shutdown, halt, reboot?! Now you have a box you cannot start using the power button! But it boots and stays up on powercord regain. This may be okay, if you want it that way. It may be handy to have the box start after switching it back to electricity. It may be an unexpected nuisance otherwise.

Okay. what happened? The internal command to power down the system is /etc/rc.poweroff. Use this instead of halt (use an alias), unless you want the effect described above. Peeking into rc.poweroff reveals it pokes a byte called POWER_DOWN_FLAG directly into a specific location on the disk. halt does not do this. I did not investigate much more, but I think this is responsible for the different behaviour on startup.

Maybe you did already add these aliases to your profile, when you made the box grown up. These help you to be able to use the commands you are used to, and still have the desired effect. (Or not! Depends on what you desire!)

# powers on by power button
alias halt='/etc/rc.poweroff'
# powers on by plugging in
alias haltplug=/sbin/halt
alias reboot='/etc/rc.reboot'