diff options
author | Matt Spinler <spinler@us.ibm.com> | 2017-01-20 15:32:07 -0600 |
---|---|---|
committer | Matt Spinler <spinler@us.ibm.com> | 2017-01-20 18:07:46 -0600 |
commit | 9f77d288612846e090ec863a8763a982b67e4d4a (patch) | |
tree | b85ce9424e022b5cf91ddb12ab1ff8e2aaec9961 | |
parent | 3874d0c89e69b02cc43d96bffd22745ac37cb2cc (diff) | |
download | talos-openbmc-9f77d288612846e090ec863a8763a982b67e4d4a.tar.gz talos-openbmc-9f77d288612846e090ec863a8763a982b67e4d4a.zip |
Send HUP signal to mboxd on power offv1.99.1
mboxd needs to receive a HUP signal to reset it
in between boots, so this will do that on a power
off so it will be ready for the next boot.
This adds about 25s to the power off sequence.
Change-Id: Icaf86de0c1fda297e74229e5ab0b182dfba96456
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb | 9 | ||||
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb index 803c1b46f..8349bb6b0 100644 --- a/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb +++ b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd.bb @@ -29,3 +29,12 @@ do_install_append() { install -d ${D}/lib/udev/rules.d install -m 0644 ${WORKDIR}/99-aspeed-mbox.rules ${D}/lib/udev/rules.d } + +TMPL = "mboxd-reload@.service" +TGTFMT = "obmc-chassis-stop@{0}.target" +INSTFMT = "mboxd-reload@{0}.service" +FMT = "../${TMPL}:${TGTFMT}.wants/${INSTFMT}" + +SYSTEMD_SERVICE_${PN} += "mboxd.service" +SYSTEMD_SERVICE_${PN} += "mboxd-reload@.service" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-phosphor/common/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service new file mode 100644 index 000000000..10182243a --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/mboxd/mboxd/mboxd-reload@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Reload mboxd after power off +Wants=op-wait-power-off@%i.service +After=op-wait-power-off@%i.service +Conflicts=obmc-chassis-start@%i.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/killall -HUP mboxd + +[Install] +WantedBy=obmc-chassis-stop@%i.target |