4 # Script to bring up CAN interface configured for the kuksa.val
5 # CAN feeder in /etc/kuksa-dbc-feeder/dbc_feeder.ini as vcan
6 # interfaces if no physical interface is present.
11 echo "Bringing up $1 as virtual CAN device"
12 ip link add dev $1 type vcan
17 CONF=/etc/kuksa-dbc-feeder/config.ini
19 if [ ! -f $CONF ]; then
23 # Ideally the parsing would take the "[can]" section into
24 # account, but this should work for now.
25 interface=$(grep ^port= $CONF |cut -d= -f2 |tr -d '"')
26 if [ -n "$interface" ]; then
27 echo "Checking $interface"
28 if ! ifconfig $interface >/dev/null 2>&1; then