diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-01-04 20:11:00 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2017-01-19 01:27:30 +0300 |
commit | c91cfcb7b1749ca2892124fc733989dbfbf159f4 (patch) | |
tree | dd622385670d4ef1a3b33aaa2152757bb4a60ca2 /meta-phosphor/common | |
parent | 223aa02f5ea5763f31f62e899a12a11659a81e4b (diff) | |
download | openbmc-c91cfcb7b1749ca2892124fc733989dbfbf159f4.tar.xz |
New sync target to control host power off
Will be used to initiate a soft power off command to the host
Change-Id: Ia9c18bd63d611ecb7041f8798ac646c206f6eb4d
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'meta-phosphor/common')
3 files changed, 17 insertions, 5 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb index 816f6e0d8..bbafa3dae 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets.bb @@ -9,15 +9,20 @@ inherit allarch CHASSIS_TARGETS = "start stop" POWER_TARGETS = "start-pre start on stop-pre stop off" -HOST_TARGETS = "start-pre start started stop-pre stop stopped" +# Track all host synchronization point target +HOST_SYNCH_TARGETS = "start-pre start started stop-pre stop stopped" +# Track all host action targets +HOST_ACTION_TARGETS = "stop" CHASSIS_FMT = "obmc-chassis-{0}@.target" POWER_FMT = "obmc-power-{0}@.target" -HOST_FMT = "obmc-host-{0}@.target" +HOST_SYNCH_FMT = "obmc-host-{0}@.target" +HOST_ACTION_FMT = "obmc-{0}-host@.target" CHASSIS_LINK_FMT = "${CHASSIS_FMT}:obmc-chassis-{0}@{1}.target" POWER_LINK_FMT = "${POWER_FMT}:obmc-power-{0}@{1}.target" -HOST_LINK_FMT = "${HOST_FMT}:obmc-host-{0}@{1}.target" +HOST_LINK_SYNCH_FMT = "${HOST_SYNCH_FMT}:obmc-host-{0}@{1}.target" +HOST_LINK_ACTION_FMT = "${HOST_ACTION_FMT}:obmc-{0}-host@{1}.target" SYSTEMD_SERVICE_${PN} += " \ obmc-mapper.target \ @@ -29,8 +34,10 @@ SYSTEMD_SERVICE_${PN} += " \ SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'CHASSIS_FMT', 'CHASSIS_TARGETS')}" SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'POWER_FMT', 'POWER_TARGETS')}" -SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_FMT', 'HOST_TARGETS')}" +SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_SYNCH_FMT', 'HOST_SYNCH_TARGETS')}" +SYSTEMD_SERVICE_${PN} += "${@compose_list(d, 'HOST_ACTION_FMT', 'HOST_ACTION_TARGETS')}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'CHASSIS_LINK_FMT', 'CHASSIS_TARGETS', 'OBMC_CHASSIS_INSTANCES')}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'POWER_LINK_FMT', 'POWER_TARGETS', 'OBMC_POWER_INSTANCES')}" -SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_FMT', 'HOST_TARGETS', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_SYNCH_FMT', 'HOST_SYNCH_TARGETS', 'OBMC_HOST_INSTANCES')}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'HOST_LINK_ACTION_FMT', 'HOST_ACTION_TARGETS', 'OBMC_HOST_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target index fcae6e968..f5b1f2da1 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-host-started@.target @@ -3,5 +3,6 @@ Description=Host%i (Started) Wants={SYSTEMD_DEFAULT_TARGET} After=obmc-host-start@%i.target Conflicts=obmc-chassis-stop@%i.target +Conflicts=obmc-stop-host@%i.target RefuseManualStart=yes RefuseManualStop=yes diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target new file mode 100644 index 000000000..8a5eba8ca --- /dev/null +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-stop-host@.target @@ -0,0 +1,4 @@ +[Unit] +Description=Power%i Host Off +Wants={SYSTEMD_DEFAULT_TARGET} +RefuseManualStop=yes
\ No newline at end of file |