#!/bin/sh

CMD=$1

case $CMD in
startup)
	iwpriv wlan0 monitor 2
	ifconfig wlan0 promisc up
	;;

shutdown)
	iwpriv wlan0 monitor 0
	ifconfig wlan0 -promisc
	;;

hopper_type)
	echo "EXTERNAL"
	;;

start_hopper)
	kismet_hopper&
	;;

stop_hopper)
	killall kismet_hopper
	;;

set_channel)
	iwconfig wlan0 channel $2
	;;

*)
	exit 1
	;;
esac

