#!/bin/sh /etc/rc.common # Copyright (C) 2006-2011 OpenWrt.org START=21 STOP=99 USE_PROCD=1 PROG=wpa_supplicant OOM_ADJ=-17 #CFG_FILE=/etc/wifi/wpa_supplicant.conf #CFG_FILE_ADD=/etc/wifi/wpa_supplicant_overlay.conf #CTR_INTERFACE=/etc/wifi/sockets CFG_FILE=/mnt/UDISK/wifi/wpa_supplicant.conf CFG_FILE_ADD=/mnt/UDISK/wifi/wpa_supplicant_overlay.conf CTR_INTERFACE=/mnt/UDISK/wifi/sockets start_service() { procd_open_instance if ps | grep [w]pa_supplicant ; then killall -q -KILL wpa_supplicant sleep 2 fi ifconfig wlan0 up procd_set_param oom_adj $OOM_ADJ procd_set_param command $PROG -iwlan0 -Dnl80211 -c$CFG_FILE -I$CFG_FILE_ADD -O$CTR_INTERFACE procd_close_instance } stop_service() { procd_open_instance if ps | grep [w]pa_supplicant ; then killall -q -KILL wpa_supplicant fi ifconfig wlan0 down procd_close_instance } restart() { stop $@ start $@ }