You have to write a configuration file which consist of things defaultrouted should check and actions to do when these checks are successful.
onlinecheck <expression>
then one or more lines of the following form:
<expression> : <action>
These lines are evaluated one by one when the onlinecheck fails. If the expression becomes
true the action is executed.
where action can be:
setessid <iface> <ssid> to set the ssid of iface
setip <iface> <ip>/<prefix> to set the ip and netmask of the iface
setwlan <iface> <mode> <ssid> <key>|off configure wlan, mode can be ad-hoc, ma
naged, master
gateway <ip> to set a defaultroute via the ip and
stop traversing the lines in the configfile
exec <cmd> execute a shell command
rexec <cmd> execute a shell command and stop traversing
the lines in the configfile.
expression can be:
<expression> and <expression>
<expression> or <expression>
not <expression>
(<expression>)
apmac <iface> <mac> checks the mac of an access point
ssid <iface> <ssid> checks the ssid
arpable <iface> <ip> checks whether the ip can be resolved
using arp
pingable <ip> checks whether the ip answers pings
link <iface> checks whether the interface has a link
assoc <iface> checks whether the interface is associated
After the lines are evaluated the onlinecheck is evaluated again periodically.
Andreas
Kemnade
You might also like these small tools