Re: Laptop Connects to WAP, But Cannot Access 'Net [FIXED]

Rich Shepard <[email protected]>
Newsgroups gmane.linux.slackware
Message-ID <[email protected]>
On Tue, 3 Apr 2012, John Crowhurst wrote:

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

John,

   Very interesting results. A quick trip to the wifi hot spot taught me that
ip does not find RUNNING, but it does find UP, so that's the test to use.

   However, while the script worked at the coffee shop, it did not bring up
the ethernet interface back here in the office. Testing taught me that the
conditional needs the results reversed. That is, if the 'if' is true, bring
eth0 down; if it's false, bring it up. At least, that brings up eth0 here;
one more trip to the coffee shop (tomorrow; I need to get client work done
today) will confirm it's working there, too.

> #!/bin/sh
> test=`ip link show wlan0|grep UP`
> if [ -z "$test" ]; then
>   ifconfig eth0 down
> else
>   ifconfig eth0 up
> fi

Again, thanks for teaching me that ip exists and preparing the script,

Rich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.