[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: starting wireless connection on boot



martin jakubik wrote:
Hello, I'm a newbie.

I've got wireless working on my Debian, but I have to log in as admin
to start it. I'd like to know how I can get it to load on bootup.

I've got a Linksys WPC54G card. I'm using ndiswrapper to run my driver.

ndiswrapper loads up normally on boot.

Currently, to get my network up, I have to
  su
  iwconfig wlan0 key xxxxxxxxxx essid my-network
  dhclient

Then I get my connection.

I've tried putting some iwconfig stuff in both /etc/network/interfaces
and etc/pcmcia/wireless.opts, but nothing seems to happen. What should
I do to get this loading during boot, and how can I test what's going
on?

thanks,
martin

Create this script in your /etc/init.d directory:

#!/bin/sh
# wireless.config
case "$1" in
    "start")
	iwconfig eth2 essid networkEssid key 1 s:password
	dhclient eth2 &
	;;
    "stop")
	;;
    "restart"|"force-reload")
	$0 stop
	$0 start
	;;
    *)
	echo "Usage: $0 {start|stop|restart|force-reload}"
	exit 1
	;;
esac

exit 0


Now run on the command line:

update-rc.d wireless.config defaults

Now next time you reboot all this will be done for you. Don't forget to change your essid and any encryption values to the ones you have setup on your network. Also, eth2 may not be your wireless device, change that accordingly.

Good luck!

Clinton



Reply to: