summaryrefslogtreecommitdiffstats
path: root/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service')
-rw-r--r--meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service17
1 files changed, 14 insertions, 3 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
index 8781073d8..4bd411e75 100644
--- a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
+++ b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service
@@ -4,8 +4,19 @@ Wants=obmc-mapper.target
After=obmc-mapper.target
[Service]
-Type=oneshot
+# We are using a Type=simple service instead of the normal Type=oneshot
+# since Type=oneshot can't have Restart= lines
+# https://github.com/systemd/systemd/issues/2582
+# Unfortunately Type=oneshot services halt any services which order after
+# the oneshot on the completion of ExecStart= lines. For Type=simple, the
+# halting is only until ExecStartPre lines have completed and ExecStart has
+# begun executing. Since we want to wait for the `mapper wait` process to
+# finish, it must be an ExecStartPre. All Type=simple services require an
+# ExecStart so we use `true` as a placeholder to satisfy the requirement.
+Type=simple
RemainAfterExit=no
-Restart=no
-ExecStart=/usr/bin/env mapper subtree-remove %I
+Restart=on-failure
+TimeoutStartSec=infinity
+ExecStartPre=/usr/bin/env mapper subtree-remove %I
+ExecStart=/usr/bin/env true
SyslogIdentifier=mapper
OpenPOWER on IntegriCloud