meta-facebook: watchdog: Add restart cause command
Added restart cause command after taking watchdog action. This
will update dbus status for restart cause of host.
(From meta-facebook rev: 6a85046dcc41024e52ffe4a5a8678548c54ee38b)
Change-Id: I057a441a26310f80837a8fe742b669b69cf3d26e
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
index d7fc724..3a22e56 100644
--- a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
+++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -6,6 +6,7 @@
[Service]
Type=oneshot
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Off
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
ExecStart=sleep 6
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.On
SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
index f00c9e8..f0f03a1 100644
--- a/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
+++ b/meta-facebook/meta-tiogapass/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -6,4 +6,5 @@
[Service]
Type=oneshot
ExecStart=busctl set-property xyz.openbmc_project.State.Chassis /xyz/openbmc_project/state/chassis0 xyz.openbmc_project.State.Chassis RequestedPowerTransition s xyz.openbmc_project.State.Chassis.Transition.Reset
+ExecStart=busctl set-property xyz.openbmc_project.Control.Host.RestartCause /xyz/openbmc_project/control/host0/restart_cause xyz.openbmc_project.Control.Host.RestartCause RequestedRestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
SyslogIdentifier=phosphor-watchdog