#!/bin/sh -e

if [ "$NETWORK_MODE" = "virtio" ]; then
    ip tuntap del mode tap dev $TAP
elif [ "$NETWORK_MODE" = "dpdk" ]; then
    /usr/lib/scylla/dpdk_nic_bind.py -u $ETHPCIID
    /usr/lib/scylla/dpdk_nic_bind.py -b $ETHDRV $ETHPCIID
fi
