[WHEREAMI] some general questions on whereami
Tim
timjhl at gmail.com
Sun Jun 4 23:18:18 NZST 2006
Hi everyone,
I'm a new user of whereami and am having some problems, maybe some of
you can point me into the right direction.
When I move from wireless to wired, eth1 (wireless interface) is not
disabled and eth0 is not enabled. I don't know about the routing
table, since I have only be able to check at home, where they are both
the same for wireless and wired network.
I'm also wondering if it is enough to ifdown eth1 to stop the wireless
interface from working. When I am working on battery, I don't want the
wireless interface transmitting or recieving, since that needlesly
uses battery.
Is there a way to have whereami try all the available wireless
networks, instead of just the first? When I'm in a location where
there's an AP I can use which is not in my configuration files and
there are also other AP's available, I don't get access to the
available network.
Are there somewhere scripts available for other stuff one might want
to do, like changing the smtp-server in Thuncerbird or changing the
proxy server in your browsers?
All information is more than welcome. You can find my detect.conf and
whereami.conf files beneath.
Cheers,
Tim
***************
* detect.conf *
***************
default undocked
# Test for the presence of an ethernet connection plugged into eth0
testmii eth0 lan
# 'down' might be a location that is forced from the command line
# like "whereami down"
if down
always at undocked
always notat eth0,eth1
elif stop
# Or maybe we can't remember the exact command, so we do it twice!
# like "whereami stop" this time
always at undocked
always notat eth0,eth1
elif lan
set INTERFACE eth0
testarp eth0,xx:xx:xx:xx:xx:xx,10.100.0.1 lanwork
testarp eth0,yy:yy:yy:yy:yy:yy,192.168.0.1 lanhome
notat down,stop,eth1
else
# If the testmii at the top failed
set INTERFACE eth1
testap scan wlan
notat down,stop,eth0
fi
# If we have found at least some WLAN APs in the vicinity, find out
# if we can do anything with any of them
if wlan
testssid home,ABC...(hex key) wlanhome,wdhcp
testssid work wlanwork,wdhcp
# # If there's anything there at all, try and DHCP off it
testap .+ wdhcp
# # And if there isn't, we will indicate that.
notat wlan,wdhcp
fi
# So it seems we should try and get DHCP off a WLAN AP
if wdhcp
testdhcp '*.*.*.*' dhcp
fi
if lanhome
testdhcp '*.*.*.*' dhcp
fi
if wlanhome
testdhcp '*.*.*.*' dhcp
fi
if wlanwork
testdhcp '*.*.*.*' dhcp
fi
if lanwork
testdhcp '*.*.*.*' dhcp
fi
# And if we have DHCP (wired or wireless) we want to make
# a decision as to which LAN that is, exactly.
if dhcp
testdhcp 192.168.1.* home-dhcp
testdhcp 10.100.0.* work-dhcp
fi
*****************
* whereami.conf *
*****************
# By default we assume that the detection configured routing
=any GATEWAY=""
# By default we assume we have an unfiltered internet connection
=any PROXY=""
=lanwork PROXY="http://proxy.work.tld:8080"
=wlanwork PROXY="http://proxy.work.tld:8080"
=any NTPDAEMON=/etc/init.d/ntp-server
=any NTPSERVER=ntp
## This only happens if we are not at a WLAN
!wlan ifconfig eth1 down
!wlan resolvconf -d eth1
## This only happens if we are not at a LAN
!lan ifconfig eth0 down
!lan resolvconf -d eth0
More information about the whereami-discuss
mailing list