186a1ebf9SAndrew Geissler[Unit]
2*69a250ddSAndrew GeisslerDescription=Power is off to Chassis%i
386a1ebf9SAndrew GeisslerAfter=phosphor-wait-power-off@%i.service
486a1ebf9SAndrew GeisslerRequires=phosphor-wait-power-off@%i.service
586a1ebf9SAndrew Geissler
686a1ebf9SAndrew Geissler[Service]
786a1ebf9SAndrew GeisslerRemainAfterExit=no
886a1ebf9SAndrew Geissler# systemd starts all wanted targets in parallel and a Conflict
986a1ebf9SAndrew Geissler# statement will resolve itself when the target starts, not when
1086a1ebf9SAndrew Geissler# completes. Some services have a requirement to stop
1186a1ebf9SAndrew Geissler# once power is off. The solution is to create a new target,
1286a1ebf9SAndrew Geissler# obmc-chassis-powered-off@.target, that is started after it is
1386a1ebf9SAndrew Geissler# verified that power has been removed from the chassis. Then
1486a1ebf9SAndrew Geissler# services may conflict with this target to ensure they
1586a1ebf9SAndrew Geissler# are stopped at the appropriate time.
1686a1ebf9SAndrew GeisslerExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target
17*69a250ddSAndrew GeisslerSyslogIdentifier=phosphor-powered-off
1886a1ebf9SAndrew Geissler
1986a1ebf9SAndrew Geissler
2086a1ebf9SAndrew Geissler[Install]
2186a1ebf9SAndrew GeisslerWantedBy=obmc-chassis-poweroff@%i.target
22