When using the 'startcmd' mode the power-off timer should not be
started if the system already is powered off. Otherwise issuing
a power-off followed by almost immediate power-on to a powered off
system will cause the system to initially power up but suddenly
shut down when the timer is triggered.

Signed-off-by: Janne Huttunen <[email protected]>
---
 lanserv/bmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lanserv/bmc.c b/lanserv/bmc.c
index 08866a6..32eed36 100644
--- a/lanserv/bmc.c
+++ b/lanserv/bmc.c
@@ -646,8 +646,8 @@ chan_start_cmd(channel_t *chan)
 static void
 ipmi_mc_stop_cmd(lmc_data_t *mc, int do_it_now)
 {
-    if (mc->startcmd.wait_poweroff)
-       /* Already powering off. */
+    if (mc->startcmd.wait_poweroff || !mc->startcmd.vmpid)
+       /* Already powering/powered off. */
        return;
     if (!do_it_now)
        mc->startcmd.wait_poweroff = mc->startcmd.poweroff_wait_time;
-- 
2.5.0


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to