#!/bin/bash CAN=can0 if [ "$1" != "" ]; then CAN=$1 fi sudo modprobe vcan sudo ip link add dev $CAN type vcan sudo ip link set $CAN up