Retourner au contenu associé (journal : Linux et WiFi)
Posté par Bouiaw le 02 novembre 2004 à 22:55. En réponse au journal Linux et WiFi. Évalué à 5.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Script init.d
Posté par Bouiaw . En réponse au journal Linux et WiFi. Évalué à 5.
#!/bin/bash
# description: Script wifi pour carte à base de chipset acx111
# chkconfig: 345 99 0
# Source function library.
. /etc/init.d/functions
start ()
{
modprobe ndiswrapper;
loadndisdriver gplus
iwconfig wlan0 essid xxx key restricted xxxxxxxxxxxxxxxxxxxxxxxxxxxxx;
ifconfig wlan0 192.168.0.1 netmask 255.255.255.0 up;
route add default gw 192.168.0.254 wlan0;
echo "Wifi activé.";
}
stop ()
{
ifconfig wlan0 down;
modprobe -r ndiswrapper;
echo "Wifi désactivé";
}
restart() {
stop
start
}
rhstatus() {
status ndiswrapper
}
case "1ドル" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
gprintf "Usage: %s {start|stop|restart|}\n" "0ドル"
exit 1
esac
exit 0