LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 07-05-2004, 08:55 PM   #1
mckinlsm
LQ Newbie
 
Registered: Apr 2004
Location: new york
Posts: 4

Rep: Reputation: 0
Start Up script for wireless running with Ndiswrapper


Just wondering how I would go about creating a startup script to start my wireless card thats running with Ndiswapper 0.8. I also need to know how to set the wireless card up to get the IP address and gateway through dhcp. Im running Fedora 2 if anyone could help it would be great

Thanks
 
Old 07-05-2004, 09:48 PM   #2
JayCnrs
Member
 
Registered: Mar 2003
Location: Winnipeg
Distribution: Suse 9.3 Pro
Posts: 404

Rep: Reputation: 30
So I take it you have installed NDISWrapper, here is the script I use to bring up my wireless card on bootup:
Code:
#!/bin/bash
iwconfig wlan0 mode managed
iwconfig wlan0 key restricted (enter wep key)
iwconfig wlan0 essid (essid broadcast from router)
Once you have this written make it executable by chmod 755 nameof script

Now under /etc/rc.d/rc5.d if you use a graphical bootup or /etc/rc.d/rc3.d if you don't use graphical login screen make a symbolic link to your script ln -s /path/to/script SxxWireless where xx is a number after your pcmcia and network scripts have run, pick a spot where the Sxx isn't a copy of any of the other Sxx to any other service.

Now you will need to download dhcpcd from here http://www.phystech.com/download/dhcpcd.html links are near bottom of page, then you will have to untar the file, then, ./configure,make,make install. Once this is done issue the command whereis dhcpcd make note of where the file is, in my case it was /usr/local/sbin/dhcpcd, take note of this.

Now fire up your favorite editor and edit /etc/rc.d/rc.local adding this to the end
Code:
/usr/local/sbin/dhcpcd wlan0
.

Now you can either reboot your PC and the network card will be brought up and pull down an ip address, then you will be able to get e-mail or surf the net.

If you don't want to reboot just run the following commands and your wireless will be brought up, as root
Code:
/path/to/script
/usr/local/sbin/dhcpcd wlan0
Or just dhcpcd wlan0 if the dhcpcd program is in your path

HTH
 
Old 07-06-2004, 11:41 AM   #3
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,090

Rep: Reputation: 41
try this rather than a script.....

Quote:
after sme digging and searching i found the answer....

/etc/sysconfig/network-scripts/ifcfg-wlan0

I added

ESSID=youressid
KEY=yourkeyhere

reboort.. it worked perfectly!!
 
Old 10-20-2008, 11:11 PM   #4
justabloggie
LQ Newbie
 
Registered: Oct 2008
Posts: 1

Rep: Reputation: 0
But what name do you save file as ? .sh ???

thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadcom Wireless (BCM4306) Wireless problems: modprobe ndiswrapper freezes HP Laptop shthap3ns Linux - Hardware 11 02-11-2007 12:53 PM
Running a script to start WiFi on boot nanodano Linux - Hardware 3 11-06-2005 09:00 PM
Script to see if a process ir running, if not start it ncsuapex Programming 4 07-03-2005 01:27 PM
running start up script Kendo1979 Linux - General 2 11-08-2004 12:48 PM
Wireless Start Up Script scoobs Linux - Wireless Networking 1 09-04-2004 12:39 AM


All times are GMT -5. The time now is 10:08 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration