diff options
author | Lei YU <mine260309@gmail.com> | 2018-08-01 09:02:26 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2018-08-08 15:27:53 +0300 |
commit | 6be4a2c7016d22fdc4b7894e1225beb53cb00975 (patch) | |
tree | b1f8c3c09bcede3887c12af6b12019bacf8d2c16 /meta-phosphor/common/recipes-phosphor/state/files | |
parent | 3a019552f9d0d45fbd00e0212dd961eb822cdafb (diff) | |
download | openbmc-6be4a2c7016d22fdc4b7894e1225beb53cb00975.tar.xz |
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>
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/state/files')
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/state/files/obmc/phosphor-reboot-host/reboot.conf | 1 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/state/files/phosphor-reboot-host@.service | 4 |
2 files changed, 3 insertions, 2 deletions
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 0000000000..2e3ca1a5bc --- /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 6158086e18..27479f2def 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 @@ After=obmc-host-stop@%i.target # 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 |