[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Power On After Power Failure...

> 	I have a Sparc 20 running as a web server at work and is plugged
> into a UPS along with two other computers. The UPS (Best Power Fortress)
> has a serial cable that plugs into one of the other computers and warns it
> of when there is a power loss and when to shutdown. I have this computer,
> via LAN and ssh, tell the other computers on the UPS to also shutdown when
> it is told by the UPS to shutdown. So, the Sparc receives a 'shutdown -h
> 1' when the AC power has failed and the UPS batteries are low.
> 	This works just fine, and the Sparc shuts down cleanly. The
> problem is that it will not start back up (after AC power has been
> restored) until one presses the power button (either on the case or the
> keyboard). Often power failures happen late at night and there is no one
> to press the power button until the following morning, if not later.

We have a similar problem with shutting down an SS10/SS20 with a serial
console. In these cases we should drop into the prom and not issue a

OK I just fixed this in the CVS tree.

Your problem can be fixed if you fix your shutdown program. In kernel/sys.c
we have:

asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void * arg)


                notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL);
                printk(KERN_EMERG "System halted.\n");

                notifier_call_chain(&reboot_notifier_list, SYS_POWER_OFF, NULL);
                printk(KERN_EMERG "Power down.\n");

So shutdown should be using LINUX_REBOOT_CMD_HALT.


Reply to: