Thu Nguyen | 6c188d6 | 2022-08-29 09:46:09 +0700 | [diff] [blame] | 1 | [Unit] |
| 2 | Description=Check Host%i status after bmc reboot |
| 3 | After=obmc-host-reset@%i.target |
| 4 | After=obmc-host-reset-running@%i.target |
| 5 | After=mapper-wait@-xyz-openbmc_project-state-host%i.service |
| 6 | OnSuccess=obmc-host-already-on@%i.target |
| 7 | ConditionPathExists=/run/openbmc/chassis@%i-on |
| 8 | ConditionPathExists=/run/openbmc/host@%i-on |
| 9 | Conflicts=obmc-chassis-poweroff@%i.target |
| 10 | |
| 11 | [Service] |
| 12 | Type=oneshot |
| 13 | ExecStart=/bin/sh -c "if [ $(busctl get-property `mapper get-service /xyz/openbmc_project/state/host0` /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host CurrentHostState | grep -i '\.Running' | wc -l) != 0 ]; then exit 0; fi" |
| 14 | |
| 15 | |