#!/bin/bash

# Support for Fliwi style VLANs

if [ -n "$IFACE" ] && \
   [ -n "$IF_FLIWI_VLAN_ID" ] && \
   [ -n "$IF_FLIWI_VLAN_RAW_DEVICE" ]; then
  if [ ! -x /sbin/vconfig ]; then
      exit 0
  fi
  # Shutdown the vlan device (just in case)
  ip link set down dev $IFACE

  # Remove the vlan device
  vconfig rem $IFACE
fi
