#!/bin/sh

PROC_FILE=/proc/wlan_sw
STORE_FILE=/etc/wifistate

case "$1" in
    start)
	cat $STORE_FILE > $PROC_FILE
	;;
    stop)
	cat $PROC_FILE > $STORE_FILE
	;;
    *)
	N=/etc/init.d/wifistate
	echo "Usage: $N {start|stop}" >&2
	exit 1
	;;
esac

exit 0
