Watchdog: Enable Host Watchdog during early poweron
Enabling the Host Watchdog during early power on was
inadvertently removed and this change is bringing that back on.
Fixes openbmc/openbmc#1888
Change-Id: Ib2220e762379360742dee4a11c06f01a6060fbbe
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service b/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
new file mode 100644
index 0000000..1fc88f3
--- /dev/null
+++ b/common/recipes-phosphor/watchdog/phosphor-watchdog/obmc-enable-host-watchdog@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Start Watchdog%i
+Wants=obmc-host-started@%i.target
+After=obmc-host-started@%i.target
+Wants=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+After=mapper-wait@-xyz-openbmc_project-watchdog-host%i.service
+Conflicts=obmc-host-stop@%i.target
+
+[Service]
+Type=oneshot
+ExecStart={sbindir}/mapper call /xyz/openbmc_project/watchdog/host%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.State.Watchdog Enabled b true
diff --git a/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf b/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf
index 7399fa5..93e74e3 100644
--- a/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf
+++ b/common/recipes-phosphor/watchdog/phosphor-watchdog/poweron.conf
@@ -1,2 +1,3 @@
[Unit]
Conflicts=obmc-host-stop@0.target
+Conflicts=obmc-chassis-poweroff@0.target