host-restart: ensure reason cleared on host stop
The host RestartCause property, similar to other host related
properties, should be reset whenever the host is stopped and the system
is brought down.
Tested:
- Verified on a power off of a system that the RestartCause was reset
to xyz.openbmc_project.State.Host.RestartCause.Unknown
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Ia860409eca4051b4f6bd4dbb997cbb528a7b2b2b
diff --git a/service_files/phosphor-reset-sensor-states@.service b/service_files/phosphor-reset-sensor-states@.service
index 102e969..14ca087 100644
--- a/service_files/phosphor-reset-sensor-states@.service
+++ b/service_files/phosphor-reset-sensor-states@.service
@@ -10,6 +10,8 @@
Type=oneshot
ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Boot.Progress BootProgress s xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified"
ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.OperatingSystem.Status OperatingSystemState s xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive"
+ExecStart=/bin/sh -c "busctl set-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host RestartCause s xyz.openbmc_project.State.Host.RestartCause.Unknown"
+
[Install]
WantedBy=multi-user.target