summaryrefslogtreecommitdiff
path: root/meta-phosphor/common/recipes-phosphor/chassis/obmc-op-control-power/op-powered-off@.service
blob: b76db7bf41b88b36dbf76983e630538eebfe369c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[Unit]
Description=Power is off to chassis%i
After=op-wait-power-off@%i.service
Requires=op-wait-power-off@%i.service

[Service]
RemainAfterExit=no
# systemd starts all wanted targets in parallel and a Conflict
# statement will resolve itself when the target starts, not when
# completes. Some services have a requirement to stop
# once power is off. The solution is to create a new target,
# obmc-chassis-powered-off@.target, that is started after it is
# verified that power has been removed from the chassis. Then
# services may conflict with this target to ensure they
# are stopped at the appropriate time.
ExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target


[Install]
WantedBy=obmc-chassis-poweroff@%i.target