You are not logged in.
Pages: 1
My laptop usually (but may not always) uses my wifi card (using ndiswrapper) to use the net. If the interface doesn't exist and Arch tries to configure it... well it's like dividing by zero in VB6. So I want to write a bash script that will set up the wifi card if it exists. How do I go about checking if a given network interface exists?
Last edited by jordanwb (2008-09-22 13:01:40)
Offline
You really don't need to write a bash script (although you can). Try this:
hwdetect --show-net
My Rigs:
- Mid-2007 iMac 20", Intel 2GHz Core 2 Duo, 2x1GB DDR2-800, 250GB SATA HDD, and...MIGHTY MOUSE!!! , OSX 10.5 Leopard, ATI Radeon 2400XT 128MB
- HP zv6203cl, AMD Athlon 64 3200 S939, 2x512MB DDR400, 80GB 4200rpm HDD, ATI Radeon Xpress 200M 128MB, Arch i686
- 1986 Gibson SG Junior Cherry Red, Ibanez 15W amp, DigiTech RP250 modeling processor
Offline
ifconfig
iwconfig
Do either of those commands help?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
You really don't need to write a bash script (although you can).
If the interface doesn't exist, bootup stalls for about 10 seconds.
Offline
If the interface doesn't exist, bootup stalls for about 10 seconds.
Looking in /sys/class/net should be one way. Ifconfig -a could help as well for unconfigured devices.
How are you configuring your network{s) though? If it's from a startup script what about just backgrounding it to avoid the stall in those cases? Also, instead of having to write your own...have you taken a look a netcfg2?
Last edited by somedrew (2008-09-20 02:13:32)
Offline
How are you configuring your network{s) though? If it's from a startup script what about just backgrounding it to avoid the stall in those cases?
I configure it through /etc/rc.conf How would I go about backgrounding it? By using the @ symbol?
Offline
How would I go about backgrounding it? By using the @ symbol?
Correct.
Offline
jordanwb wrote:How would I go about backgrounding it? By using the @ symbol?
Correct.
Okee dokee.
Thanks.
Offline
Pages: 1