phosphor-reboot-host: Use environment file for sleep

By default phosphor-reboot-host@.service sleeps for 5 seconds between
power off and power on.
Make the sleep time as configurable parameter in environment, so
different machines could use different sleep time.

Tested: Verify the sleep time is from the config file.

Change-Id: I81d17e56010fe595dd46295923746f8678678209
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/meta-phosphor/common/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf b/meta-phosphor/common/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf
new file mode 100644
index 0000000..2e3ca1a
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf
@@ -0,0 +1 @@
+REBOOT_DELAY=5
diff --git a/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
index 6158086..27479f2 100644
--- a/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
+++ b/meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service
@@ -11,8 +11,8 @@
 # solution does the job.
 # Since this is a part of the reboot target, call the startmin
 # target which does the minimum required to start the host.
-ExecStart=/bin/sh -c "sleep 5 && systemctl start obmc-host-startmin@%i.target"
-
+ExecStart=/bin/sh -c "sleep ${{REBOOT_DELAY}} && systemctl start obmc-host-startmin@%i.target"
+EnvironmentFile={envfiledir}/obmc/phosphor-reboot-host/reboot.conf
 
 [Install]
 WantedBy=obmc-host-reboot@%i.target
diff --git a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
index 4c642dd..0b974c2 100644
--- a/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
+++ b/meta-phosphor/common/recipes-phosphor/state/phosphor-state-manager.bb
@@ -52,6 +52,7 @@
 FILES_${PN}-host = "${sbindir}/phosphor-host-state-manager"
 DBUS_SERVICE_${PN}-host += "xyz.openbmc_project.State.Host.service"
 DBUS_SERVICE_${PN}-host += "phosphor-reboot-host@.service"
+SYSTEMD_ENVIRONMENT_FILE_${PN}-host += "obmc/phosphor-reboot-host/reboot.conf"
 SYSTEMD_SERVICE_${PN}-host += "phosphor-reset-host-reboot-attempts@.service"
 
 FILES_${PN}-chassis = "${sbindir}/phosphor-chassis-state-manager"