meta-facebook: harma: fixed watchdog action
Fixed watchdog action script
Change-Id: I81bd689182a91c8c038ca45dfeac88972d03c4dd
Signed-off-by: Peter Yin <peter.yin@quantatw.com>
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
index 3a22e56..9a1a905 100644
--- a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-cycle.service
@@ -1,12 +1,12 @@
[Unit]
Description=Power Cycle Host Server
-Requires=host-gpio.service
-After=host-gpio.service
[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=busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Off"
+ExecStart=busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RestartCause 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
+ExecStart=busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.On"
+
SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
index ddcb9dc..bd2bd04 100644
--- a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-poweroff.service
@@ -1,9 +1,9 @@
[Unit]
Description=Shutdown Host Server
-Requires=host-gpio.service
-After=host-gpio.service
[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.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.Off"
+
SyslogIdentifier=phosphor-watchdog
diff --git a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
index f0f03a1..5a46cc0 100644
--- a/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
+++ b/meta-facebook/recipes-phosphor/watchdog/phosphor-watchdog/phosphor-watchdog-host-reset.service
@@ -1,10 +1,10 @@
[Unit]
Description=Reset Host Server
-Requires=host-gpio.service
-After=host-gpio.service
[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
+
+ExecStart=busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.ForceWarmReboot"
+ExecStart=busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RestartCause s xyz.openbmc_project.State.Host.RestartCause.WatchdogTimer
+
SyslogIdentifier=phosphor-watchdog