1#!/bin/bash
2
3EID=$(($1*10))
4count=0
5
6while [ $count -lt 12 ]; do
7    busctl get-property xyz.openbmc_project.MCTP /xyz/openbmc_project/mctp/1/"$EID" xyz.openbmc_project.MCTP.Endpoint EID
8    isMctpConnect=$?;
9    echo $isMctpConnect
10    if [ $isMctpConnect -eq 0 ]; then
11        exit 0;
12    fi
13    sleep 5;
14    count=$((count + 1))
15done
16
17echo "timeout waiting for MCTP connection"
18exit 1
19