summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service')
-rw-r--r--meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service b/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service
new file mode 100644
index 000000000..27479f2de
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/state/files/phosphor-reboot-host@.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Reboot host%i
+Wants=obmc-host-stop@%i.target
+After=obmc-host-stop@%i.target
+
+[Service]
+#ExecStart={base_bindir}/systemctl start obmc-host-start@%i.target
+# This service is starting another target that conflicts with the
+# target this service is running in. OpenBMC needs a refactor of
+# how it does its host reset path. Until then, this short term
+# solution does the job.
+# Since this is a part of the reboot target, call the startmin
+# target which does the minimum required to start the host.
+ExecStart=/bin/sh -c "sleep ${{REBOOT_DELAY}} && systemctl start obmc-host-startmin@%i.target"
+EnvironmentFile={envfiledir}/obmc/phosphor-reboot-host/reboot.conf
+
+[Install]
+WantedBy=obmc-host-reboot@%i.target
OpenPOWER on IntegriCloud