
/etc/rc.d/wifi
By: a guest on Jan 17th, 2011 | syntax:
Bash | size: 0.51 KB | hits: 85 | expires: Never
#!/bin/bash
# /etc/rc.d/wifi
. /etc/rc.conf
. /etc/rc.d/functions
case "$1" in
start)
stat_busy "Starting Wireless"
ifconfig wlan0 inet 192.168.1.35 up && iwconfig wlan0 essid RT2561_6 && (add_daemon wifi && stat_done) || stat_fail
;;
stop)
stat_busy "Stopping Wireless"
ifconfig wlan0 down && (rm_daemon wifi && stat_done) || stat_fail
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0