Matthew Barth | 253a5aa | 2018-01-10 09:16:28 -0600 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Power is off to chassis%i |
| 3 | After=op-wait-power-off@%i.service |
| 4 | Requires=op-wait-power-off@%i.service |
| 5 | |
| 6 | [Service] |
| 7 | RemainAfterExit=no |
| 8 | # systemd starts all wanted targets in parallel and a Conflict |
| 9 | # statement will resolve itself when the target starts, not when |
| 10 | # completes. Some services have a requirement to stop |
| 11 | # once power is off. The solution is to create a new target, |
| 12 | # obmc-chassis-powered-off@.target, that is started after it is |
| 13 | # verified that power has been removed from the chassis. Then |
| 14 | # services may conflict with this target to ensure they |
| 15 | # are stopped at the appropriate time. |
| 16 | ExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target |
| 17 | |
| 18 | |
| 19 | [Install] |
| 20 | WantedBy=obmc-chassis-poweroff@%i.target |