LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Start Up script for wireless running with Ndiswrapper (https://www.linuxquestions.org/questions/linux-wireless-networking-41/start-up-script-for-wireless-running-with-ndiswrapper-201532/)

mckinlsm 07-05-2004 08:55 PM

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

JayCnrs 07-05-2004 09:48 PM

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 :)

trey85stang 07-06-2004 11:41 AM

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!!

justabloggie 10-20-2008 11:11 PM

But what name do you save file as ? .sh ???

thanks,


All times are GMT -5. The time now is 12:32 PM.