Add checking ApplyTime for static layout

Add a check for static BMC whether auto reboot to apply update or not.

Tested: Verified with setting ApplyTime to Immediate and using
        obmc-phosphor-image-<platorm>-<timestamp>.static.mtd.all.tar,
        and BMC code update works fine.

Change-Id: I13b77b783746b083e09d96757ad7868fe7660fe3
Signed-off-by: Bright Cheng <bright_cheng@wiwynn.com>
diff --git a/activation.cpp b/activation.cpp
index 382eae0..f891877 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -233,7 +233,17 @@
         // Create active association
         parent.createActiveAssociation(path);
 
-        log<level::INFO>("BMC image ready, need reboot to get activated.");
+        if (Activation::checkApplyTimeImmediate() == true)
+        {
+            log<level::INFO>("Image Active. ApplyTime is immediate, "
+                             "rebooting BMC.");
+            Activation::rebootBmc();
+        }
+        else
+        {
+            log<level::INFO>("BMC image ready, need reboot to get activated.");
+        }
+
         return softwareServer::Activation::activation(
             softwareServer::Activation::Activations::Active);
 #endif