1[Unit] 2Description=Power is off to chassis%i 3After=phosphor-wait-power-off@%i.service 4Requires=phosphor-wait-power-off@%i.service 5 6[Service] 7RemainAfterExit=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. 16ExecStart=/bin/systemctl start obmc-chassis-powered-off@%i.target 17 18 19[Install] 20WantedBy=obmc-chassis-poweroff@%i.target 21