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        echo "MCTP ETD $EID connection successfully."
12        exit 0;
13    fi
14    echo "MCTP EID $EID not connection yet."
15    sleep 5;
16    count=$((count + 1))
17done
18
19echo "timeout waiting for MCTP EID $EID connection."
20exit 1
21