Commit 9f77d288 authored by Matt Spinler's avatar Matt Spinler

Send HUP signal to mboxd on power off

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: default avatarMatt Spinler <spinler@us.ibm.com>
parent 3874d0c8
......@@ -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')}"
[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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment