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