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
22 if [ ! -f $CONF ]; then
26 # Ideally the parsing would take the "[can]" section into
27 # account, but this should work for now.
28 interface=$(grep ^port= $CONF |cut -d= -f2 |tr -d '"')
29 if [ -n "$interface" ]; then
30 echo "Checking $interface"
31 if ! ifconfig $interface >/dev/null 2>&1; then