blob: feaa3d0b5f9bb238fc1416130d238cd158356560 [file] [log] [blame]
Thu Nguyen6c188d62022-08-29 09:46:09 +07001[Unit]
2Description=Check Host%i status after bmc reboot
3After=obmc-host-reset@%i.target
4After=obmc-host-reset-running@%i.target
5After=mapper-wait@-xyz-openbmc_project-state-host%i.service
6OnSuccess=obmc-host-already-on@%i.target
7ConditionPathExists=/run/openbmc/chassis@%i-on
8ConditionPathExists=/run/openbmc/host@%i-on
9Conflicts=obmc-chassis-poweroff@%i.target
10
11[Service]
12Type=oneshot
13ExecStart=/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