summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb1
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots.bb9
-rw-r--r--meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots.service13
3 files changed, 23 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
index e4decd47c..d5a542a6a 100644
--- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/packagegroups/packagegroup-op-apps.bb
@@ -31,6 +31,7 @@ RDEPENDS_${PN}-chassis = " \
obmc-op-control-power \
obmc-pcie-detect \
obmc-watchdog \
+ obmc-host-failure-reboots \
"
#Pull in obmc-fsi-scan on all P9 OpenPOWER systems
RDEPENDS_${PN}-chassis += "${@mf_enabled(d, 'obmc-fsi-scan', 'obmc-fsi-scan')}"
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots.bb b/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots.bb
new file mode 100644
index 000000000..e0f9b8442
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots.bb
@@ -0,0 +1,9 @@
+SUMMARY = "Enables reboots on host failures"
+DESCRIPTION = "Manages the settings entry that controls reboots \
+on host failures"
+PR = "r1"
+
+inherit obmc-phosphor-systemd
+inherit obmc-phosphor-license
+
+SYSTEMD_SERVICE_${PN} += "host-failure-reboots.service"
diff --git a/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots.service b/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots.service
new file mode 100644
index 000000000..81902ae37
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/chassis/obmc-host-failure-reboots/host-failure-reboots.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Enable reboot on host failures
+Wants=mapper-wait@-org-openbmc-settings-host0.service
+After=mapper-wait@-org-openbmc-settings-host0.service
+
+[Service]
+ExecStart = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host0` /org/openbmc/settings/host0 org.openbmc.settings.Host auto_reboot s \"yes\""
+ExecStop = /bin/sh -c "busctl set-property `mapper get-service /org/openbmc/settings/host0` /org/openbmc/settings/host0 org.openbmc.settings.Host auto_reboot s \"no\""
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}
OpenPOWER on IntegriCloud