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:
- Power button: System start / Clean shutdown (press > 3 sec)
- Shutdown / Reboot via Web interface: Clean shutdown / reboot
- Switch on by powercord: box starts to see it was not meant to run and shuts down again
- Powercord after electricity failure: (I am not entirely sure of this, but I strongly guess) Starts, sees it was meant to run, filesystem check, stays up.
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'