1*86a1ebf9SAndrew Geissler[Unit]
2*86a1ebf9SAndrew GeisslerDescription=Power is off to chassis%i
3*86a1ebf9SAndrew GeisslerAfter=phosphor-wait-power-off@%i.service
4*86a1ebf9SAndrew GeisslerRequires=phosphor-wait-power-off@%i.service
5*86a1ebf9SAndrew Geissler
6*86a1ebf9SAndrew Geissler[Service]
7*86a1ebf9SAndrew GeisslerRemainAfterExit=no
8*86a1ebf9SAndrew Geissler# systemd starts all wanted targets in parallel and a Conflict
9*86a1ebf9SAndrew Geissler# statement will resolve itself when the target starts, not when
10*86a1ebf9SAndrew Geissler# completes. Some services have a requirement to stop
11*86a1ebf9SAndrew Geissler# once power is off. The solution is to create a new target,
12*86a1ebf9SAndrew Geissler# obmc-chassis-powered-off@.target, that is started after it is
13*86a1ebf9SAndrew Geissler# verified that power has been removed from the chassis. Then
14*86a1ebf9SAndrew Geissler# services may conflict with this target to ensure they
15*86a1ebf9SAndrew Geissler# are stopped at the appropriate time.
16*86a1ebf9SAndrew GeisslerExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target
17*86a1ebf9SAndrew Geissler
18*86a1ebf9SAndrew Geissler
19*86a1ebf9SAndrew Geissler[Install]
20*86a1ebf9SAndrew GeisslerWantedBy=obmc-chassis-poweroff@%i.target
21