Re: Laptop Connects to WAP, But Cannot Access 'Net [FIXED]
John Crowhurst <[email protected]>
| Newsgroups | gmane.linux.slackware |
|---|---|
| Message-ID | <[email protected]> |
Rich, Okay, modify the script. I'd suggest looking at what happens when you are connected and compare it to when you are not connected, perhaps something in iwconfig. Change the test line to run iwconfig wlan0 |grep "whatever shows you connected" That way, when you are not connected, it brings the eth0 interface up and when you are connected using wlan0 it brings the eth0 interface down. You probably don't want to grep for the coffee shop ssid though, because you'd probably want to go some place else one day and your script will stop working properly. You could put this script in cron for instance, and it would check every so often and bring the interface up or down appropriately. On 03/04/2012 19:51, Rich Shepard wrote: > On Tue, 3 Apr 2012, John Crowhurst wrote: > >> A few seconds typing: >> >> #!/bin/sh >> test=`ip link show wlan0|grep UP` >> if [ -z "$test" ]; then >> ifconfig eth0 up >> else >> ifconfig eth0 down >> fi > > John, > > Thank you. Would it be better to check whether wlan0 is RUNNING > since both > interfaces show UP even if one is not connected? > > Rich > > > _______________________________________________ > slackware mailing list > [email protected] > https://mailman.lug.org.uk/mailman/listinfo/slackware