4 # Script to bring up CAN interfaces configured in /etc/dev-mapping.conf
5 # as vcan interfaces if no physical interface is present.
10 echo "Bringing up $1 as virtual CAN device"
11 ip link add dev $1 type vcan
16 if [ ! -f /etc/dev-mapping.conf ]; then
20 hs=$(grep ^hs= /etc/dev-mapping.conf |cut -d= -f2 |tr -d '"')
21 ls=$(grep ^ls= /etc/dev-mapping.conf |cut -d= -f2 |tr -d '"')
25 if ! ifconfig $hs >/dev/null 2>&1; then
29 if [ -n "$ls" -a "$ls" != "$hs" ]; then
31 if ! ifconfig $ls >/dev/null 2>&1; then