X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-connectivity%2Fkuksa-val%2Fcan-dev-helper%2Fcan-dev-helper.sh;fp=recipes-connectivity%2Fkuksa-val%2Fcan-dev-helper%2Fcan-dev-helper.sh;h=d57604c07520a58f1e5906d93f6c546ba4dfaf2f;hb=f6a2980917592000382d2a9af9ea4803e90f9f88;hp=69dc62831bdffbaf75e079d1e15e99e227411cb8;hpb=addb673cf642c1b06bfa912baf1aabbce5297400;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh b/recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh index 69dc62831..d57604c07 100644 --- a/recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh +++ b/recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh @@ -25,7 +25,7 @@ fi # Ideally the parsing would take the "[can]" section into # account, but this should work for now. -interface=$(grep ^port= $CONF |cut -d= -f2 |tr -d '"') +interface=$(sed -nr '/\[can\]/,/\[/{s/^port *= *//p}' $CONF) if [ -n "$interface" ]; then echo "Checking $interface" if ! ifconfig $interface >/dev/null 2>&1; then