#!/bin/sh

. /etc/init.d/globals

case "$ACTION" in
	add|"")
		if [ -s /etc/wpa_supplicant.conf ]; then
			LOGINFO "trying to bring $MDEV up"
			ifup $MDEV
		else
			LOGWARN "/etc/wpa_supplicant.conf missing or empty, not trying to bring $MDEV up"
		fi
		;;

	remove)
		LOGINFO "trying to bring $MDEV down"
		ifdown $MDEV
		;;
esac
