Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Suse 9 Howto

From Rt2x00Wiki

Below are instructions and scripts from eaglenest on how to get the rt2400 working under Suse9.1

The main script in /usr/sbin/ may be called by root anytime. Another script in /etc/init.d/ calls the main script on boot or shutdown. Links to the latter script from /etc/init.d/rc3.d/ and rc5.d/ should be numbered (here: S07, K15) so that ra0 is started after network and stopped before network. Edvard

-rw-r--r-- root root /etc/sysconfig/network/ifcfg-wlan-ra0
lrwxrwxrwx root root /etc/sysconfig/network/ifcfg-ra0 -> ifcfg-wlan-ra0
-rwxr-xr-x root root /usr/sbin/wlan-ra0
lrwxrwxrwx root root /usr/sbin/rcwlan-ra0 -> /etc/init.d/wlan-ra0
-rwxr-xr-x root root /etc/init.d/wlan-ra0
lrwxrwxrwx root root /etc/init.d/rc3.d/K15wlan-ra0 -> ../wlan-ra0
lrwxrwxrwx root root /etc/init.d/rc3.d/S07wlan-ra0 -> ../wlan-ra0
lrwxrwxrwx root root /etc/init.d/rc5.d/K15wlan-ra0 -> ../wlan-ra0
lrwxrwxrwx root root /etc/init.d/rc5.d/S07wlan-ra0 -> ../wlan-ra0
# /etc/sysconfig/network/ifcfg-wlan-ra0
#DEVICE=ra0
#MODULE=rt2400
#STARTMODE=onboot
STARTMODE=manual
BOOTPROTO=dhcp 
NETMASK=255.255.255.0
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
BROADCAST=192.168.1.255
#BROADCAST=192.168.255.255
#IPADDR=192.168.1.101
#REMOTE_IPADDR=
#AUTHTYPE=restricted
#WIRELESS_MODE=Automatic
WIRELESS_MODE=Managed
WIRELESS_BITRATE=auto
WIRELESS_CHANNEL=auto
#WIRELESS_CHANNEL=6 
WIRELESS_AP=00:03:2F:1F:45:6F
WIRELESS_ESSID=any
#WIRELESS_ESSID=MYESSID
WIRELESS_KEY=off
#WIRELESS_KEY=XXXXXXXXXXXXX
#WIRELESS_NICK=nowhereman
WIRELESS_NWID=
WIRELESS_POWER=no
_nm_name='static-0'


#!/bin/sh
# /usr/sbin/wlan-ra0
#------------------------------------------------------------
# By eaglenest@users.sourceforge.net
# July-August 2004, based on tips from the
# rt2400 Linux Driver project help forum
# (rt2400.sourceforge.net) - no copyright.
#
# In SuSE this script brings up and connects
# an rt2400 chipset based wireless network
# card to a DHCP server. It is not validated
# with regard to static IP addressing.
# See also /etc/init.d/wlan-ra0
#------------------------------------------------------------
case "$1" in
down)
# Bring down device and uninstall module
/sbin/ifconfig ra0 down
/sbin/modprobe -r rt2400.o
;;
up)
# Install module and bring up device
/sbin/insmod /usr/src/rt2400-1.2.0/Module/rt2400.o 2>/dev/null
/sbin/ifconfig ra0 up
# Set wireless parameters as needed; be sure to set at least
# the mode and authentication-type before scanning starts
/usr/sbin/iwconfig ra0 mode Managed
/usr/sbin/iwconfig ra0 channel auto
/usr/sbin/iwconfig ra0 rate auto
#/usr/sbin/iwconfig ra0 nick nowhereman
#/usr/sbin/iwconfig ra0 key restricted [1] XXXXXXXXXXXXX
#/usr/sbin/iwconfig ra0 key [1]
/usr/sbin/iwconfig ra0 key off
# Start scanning. NOTE: must start within seconds of ifconfig
#/usr/sbin/iwconfig ra0 essid MYESSID
/usr/sbin/iwconfig ra0 essid any
# Connect to DHCP server (comment if not DHCP)
/sbin/dhclient ra0
# Settings for static IP (comment if DHCP)
#/sbin/ifconfig ra0 x.x.x.x netmask x.x.x.x broadcast x.x.x.x
# If this is the only card, or really is your default uplink:
#ip route add default via 192.168.1.1 dev ra0
;;
*)
echo "Usage: $0 {up|down}"
exit 1
esac 


#!/bin/sh
# /etc/init.d/wlan-ra0
#------------------------------------------------------------
# By eaglenest@users.sourceforge.net
# August 2004, based on examples from
# /etc/init.d/ and tips from the
# rt2400 Linux Driver project help forum
# (rt2400.sourceforge.net) - no copyright.
#
# On boot in SuSE this script calls
# /usr/sbin/wlan-ra0 with the "up" option, and
# on shutdown calls it with the "down" option.
# For further details see /usr/sbin/wlan-ra0
#------------------------------------------------------------
#
### BEGIN INIT INFO
# Provides: wlan-ra0
# Required-Start: $network
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 4 6
# Description: wlan-ra0 - the wireless network device ra0
### END INIT INFO
. /etc/rc.status
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test -x /usr/sbin/wlan-ra0 || exit 0
case "$1" in
start)
# echo -n 'Starting wlan-ra0 '
echo 'Starting wlan-ra0... '
# startproc /usr/sbin/wlan-ra0
/usr/sbin/wlan-ra0 up
echo -n '... starting wlan-ra0: '
rc_status -v
;;
stop)
echo -n "Shutting down wlan-ra0: "
# killproc -TERM /usr/sbin/wlan-ra0
/usr/sbin/wlan-ra0 down
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
try-restart)
$0 status
if test $? = 0; then
$0 restart
else
rc_reset 
fi
rc_status
;;
force-reload)
$0 stop; sleep 1 && $0 start
rc_status
;;
# reload)
# echo -n "Reload service wlan-ra0: "
# killproc -HUP /usr/sbin/wlan-ra0
# rc_status -v
# ;;
status)
echo -n "Checking for wlan-ra0: "
checkproc /usr/sbin/wlan-ra0
rc_status -v
;;
*)
# echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}"
echo "Usage: $0 {start|stop|try-restart|restart|force-reload|status}"
exit 1
esac
rc_exit

Retrieved from "http://rt2x00.serialmonkey.com../../../s/u/s/Suse_9_Howto_e729.html"

This page has been accessed 29,038 times. This page was last modified 14:18, 19 November 2005 by Mark Wallis. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports