Code Review
/
AGL
/
meta-agl-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Replace agl-demo* features with preconfigured images
[AGL/meta-agl-demo.git]
/
recipes-connectivity
/
kuksa-val
/
can-dev-helper
/
can-dev-helper.sh
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
de9894d
..
d57604c
100644
(file)
--- a/
recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh
+++ b/
recipes-connectivity/kuksa-val/can-dev-helper/can-dev-helper.sh
@@
-15,6
+15,9
@@
vcan_up() {
}
CONF=/etc/kuksa-dbc-feeder/config.ini
}
CONF=/etc/kuksa-dbc-feeder/config.ini
+if [ $# -gt 0 ]; then
+ CONF=$1
+fi
if [ ! -f $CONF ]; then
exit 0
if [ ! -f $CONF ]; then
exit 0
@@
-22,7
+25,7
@@
fi
# Ideally the parsing would take the "[can]" section into
# account, but this should work for now.
# 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
if [ -n "$interface" ]; then
echo "Checking $interface"
if ! ifconfig $interface >/dev/null 2>&1; then