#!/usr/bin/env bash

if [ $(id -u) -ne 0 ]; then
    exec sudo "$0"
fi

. firmware/tools/can_gateway/vcan_ifs.sh

modprobe vcan
for vcan_if in "${VCAN_IFS[@]}"; do
    ip link add "$vcan_if" type vcan
    ip link set "$vcan_if" up
done
