#!/bin/sh DESC="TI1251 Wireless LAN driver" NAME="tiwlan" d_stop() { if `grep -q wlan /proc/modules` ; then rmmod wlan fi } d_start() { insmod $(busybox find /lib/modules/$(uname -r) -name "wlan.ko") /usr/bin/tiwlan_loader -n -f /lib/firmware/wl1251-fw.bin -i /etc/tiwlan.ini } case "$1" in start) echo -n "Starting $DESC: $NAME" d_start echo "." ;; stop) echo -n "Stopping $DESC: $NAME" d_stop echo "." ;; restart|force-reload) echo -n "Restarting $DESC: $NAME" d_stop sleep 1 d_start echo "." ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0