#!/bin/bash

case $ACTION in
add|register)
	echo "insert" >> /tmp/log
	if grep -q ath0 /etc/network/ifstate; then
	ifdown ath0
	fi
   	ifup ath0
	;;
remove|unregister)
	echo "remove" >> /tmp/log
   	ifup ath0
	;;
esac
echo done >> /tmp/log
