help with script for dis-& enabling wifi interface

Hi all,

Could someone help me out with making a script that netwatches a wireless interface, and when the interface is disabled, some script FIRST disables the interface again, and then enables it again?

The reason for this is that sometimes the wireless interface on my bridges disables itself for no reason. I tried al sort of hardware changes, so it’s just a wifi problem. When i first disable the interface and then enable it, the interface comes up again.

it’s very important to first disable. i made a simple script that just enables the interface every 10 seconds, but this doesn’t help. Second thing is that it fills my log with the argument “device changed by admin” which makes reading the log a big problem.

Thanks in advance for the help!

Send an e-mail to lists@wm-access.no, it is my mailinglist account. I can then send you a copy of one of my script that does what you say, it has a few requirements or prerequisits though. The reason i can’t paste here is that either the forum or my current temporary browser is a bit broken.

All wlan interfaces must have running-check enabled!

First off the wlan interfaces requires an entry in the access-list. This entry can be invalid, disabled or bogus as long as the interface is mentioned in the access-list it will perform reset on it, this is to not fill the log messages if no-one is attached to the interface.

It will not reset virtual-ap’s and not reset the interface if a virtual-ap is in mode “running” on the interface, this is to handle the cases when no customers are on the primary interface but someone are connected to the virtual-aps. Primary has to work for this to happen so it’s a sign it’s not broken.

advanced-tools package is installed and the e-mail “From” field is both recipient and sender (ie. e-mail from test@mydomain.com to test@mydomain.com) in the simple format “test@mydomain.com” and not in proper format “<test@mydomain.com>” as this is reformatted before transmission. E-mail server is set.

Hi Sten,

You were right. The interface is not disabled when the wifi-cell goes down.

I used your first Script, and it works great!

Thanks for the great help man.

Cheerz,

Arco