1 2 3 4 5 6
#!/bin/sh set -eu if [ -e "/proc/net/vlan/${IFACE}" ]; then ip link delete dev "${IFACE}" type vlan fi