LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   want to start script when wlan interface goes up (http://www.linuxquestions.org/questions/linux-wireless-networking-41/want-to-start-script-when-wlan-interface-goes-up-539848/)

nrsorte 03-23-2007 03:03 AM

want to start script when wlan interface goes up
 
Hi,

I am writing a script to configure my wireless wlan settings. What should I do to automate it so that this script will run whenever wlan goes up. Please anyone guide me for this.

Thanks in advance.
Namrata

saavik 03-24-2007 07:59 AM

Well I am not really sure what and when you want to run the script but maybe the search for ip-up.local could help.

In this script you can add things like mailing your actually ip.

If this does not help you may post some more infos.

jschiwal 03-24-2007 08:05 AM

Putting your distro in your profile will help get more accurate responses. Some distros use certain config files and scripts that may be a better fit toward a solution.

tommosimmo 03-24-2007 06:48 PM

Hi there,

Try editing/making your /etc/sysconfig/network-scripts/ifcfg-interfacename file to something like;

TYPE=Wireless
DEVICE=device name here
HWADDR=
BOOTPROTO=dhcp
GATEWAY=ap's ip address here
DOMAIN=
ONBOOT=yes (if you want it to try and connect at boottime)
ONHOTPLUG=no
USERCTL=yes (Allows all users to start/stop the connection)
IPV6INIT=no
PEERDNS=no
ESSID=The Ap's SSID here.
CHANNEL=<the default AP channel here>
MODE=Auto
RATE=Auto

BTW, What distro and hardware are you using?

Cheers, and good luck.
Tom

jschiwal 03-26-2007 04:45 AM

For SuSE, the same config scripts are in /etc/sysconfig/network/. Some distro's may not have anything similar and you need to produce a script with iwconfig commands. That's why knowing the distro helps, and a logical place for it is in the profile instead of having to repeat it on every post.

nrsorte 03-26-2007 08:24 AM

Hi,

I have Linux-Pebble installed on my router boards and on them I want to run a script whenever my wlan goes up. After this in script I want to analyse wireless link status. Is it possible to do so on this Pebble? If so please could you guide me for the same.

Namrata


All times are GMT -5. The time now is 04:47 AM.