summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/wait-until-mctp-connection-done
blob: 569f47f614d0d1b3e97488f7f04f0e516e2fd618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

EID=$(($1*10))
count=0

while [ $count -lt 12 ]; do
    busctl get-property xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/1/"$EID" xyz.openbmc_project.MCTP.Endpoint EID
    isMctpConnect=$?;
    echo $isMctpConnect
    if [ $isMctpConnect -eq 0 ]; then
        exit 0;
    fi
    sleep 5;
    count=$((count + 1))
done

echo "timeout waiting for MCTP connection"
exit 1