summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh')
-rw-r--r--recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh2
1 files changed, 1 insertions, 1 deletions
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