Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
mi wrote:
> Hi Matej.
> ppp seems to exchange /etc/resolv.conf in some cases, when establishing the 
> connection. Could that cause any trouble in your chain ?

Probably, but the problems occur even when running whereami with
nothing to be done defined in whereami.conf.

Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.
-- Benjamin Franklin, Historical Review
   of Pennsylvania, 1759.



Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
mi wrote:
> Hi Matej.
> ppp seems to exchange /etc/resolv.conf in some cases, when establishing the 
> connection. Could that cause any trouble in your chain ?

Probably, but the problems occur even when running whereami with
nothing to be done defined in whereami.conf.

Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety.
-- Benjamin Franklin, Historical Review
   of Pennsylvania, 1759.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-24 Thread mi
Hi Matej.
ppp seems to exchange /etc/resolv.conf in some cases, when establishing the 
connection. Could that cause any trouble in your chain ?
  
  micha.



Re: Whereami with PPP?

2003-02-24 Thread mi
Hi Matej.
ppp seems to exchange /etc/resolv.conf in some cases, when establishing the 
connection. Could that cause any trouble in your chain ?
  
  micha.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
Andrew McMillan wrote:
> The problem will most likely be that "testping" is written to be very
> fast by using options which are suited to pinging machines on a 10Mb or
> better LAN.

OK, I will try that, but I am not sure, whether I have described
well the problem. whereami testing proceeds well (and
/etc/whereami/im correctly contains lines ppp,surfbest), but THEN
when using fping/ping/dig/host on command line it is not able to
find anything.

What is even more strange is that even now, when I am on the
university LAN the things doesn't work. When I do things
manually, i.e.:

cardctl insert
ifconfig eth0 up
dhclient eth0

I get working network connection (ping works like a charm --
although DNS resolution is still slow). However, when I use
whereami (see attached .conf files) it agains detect things
correctly (lan,dhcp,neu in iam file), but DNS resolution again
doesn't work at all (see attached copy of stderr when running
whereami).

/sbin/dhclient is a link to /sbin/dhclient3 and otherwise
everything is plain woody (setmailrelay script is from testing
distribution -- I have exim here). Output from host -v neu.edu
and /var/lib/dhcp3/dhclient.leases are also attached.

   Any thoughts?

  Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I know of no country in which there is so little independence of
mind and real freedom of discussion as in America.
-- Alexis de Tocqueville

eth0
# The (planned) detection configuration file for 'whereami'
# $Id: detect.conf,v 1.3 2003/02/21 19:09:15 root Exp $
#
# This file describes unique features of various environments you connect
# to and associates them with those locations.

# When a test is successful, no further tests will be conducted
# until a subsequent 'if' or 'fi' statement, or if the line is preceded
# by the word 'always'
#
# You may also set environment variables for the scripts (test and action)
# subsequently called by whereami using "set  ".
#
# See man 5 detect.conf for more information.

# The entries below are examples only - you will need to add your own

set DEBUGWHEREAMI 1
default unknown
testmii eth0 lan
# always testpci Lucent bogus1
# always testpci CMD docked,office

if lan
  set INTERFACE eth0
  testdhcp '*.*.*.*' dhcp
  testping192.168.0.3  home
else
  #testmodule   ppp_deflateppp
fi

if dhcp
  #testdhcp192.10.*.*   neu
  testping192.10.244.11neu
  #testdhcp192.*mit
fi

if ppp
  set INTERFACE ppp0
  # testing DNS server
  testping198.6.1.6   surfbest
  #testping198.6.1.6   volny
fi
# Configuration file for setmailrelay of whereami
#
#
# The DEFAULT_RELAY sets the fallback for the mailserver to relay through
#
DEFAULT_RELAY=smtp.surfbest.net
#
# The MAIL_SERVER chooses between sendmail, postfix and exim.  If you omit
# this the system will choose the one it first finds a configuration file
# for, which is normally a safe approach.
#
MAIL_SERVER=exim
# Configuration for whereami during suspend and resume
#
# On suspend/resume, whereami will change to the location specified in
# the config file for SUSPEND_LOCATION and RESUME_LOCATION.
# If the location is 'auto', whereami performs location detection. A blank
# location disables whereami for that event
#

# Uncomment to enable whereami detection on resume.
#  Note: the current apmd may send multiple resume events on wakeup for 
#  Thinkpads, which results in whereami running twice.
RESUME_LOCATION=auto

# Use SUSPEND_LOCATION if you want to set a location on suspend.
#  Note: Your network card may already be suspended at this point, so
#  don't be too surprised if trying to unmount something does not work...
#SUSPEND_LOCATION=undocked

+ /sbin/mii-tool eth0
+ grep 'link ok'
+ exit 0
+ IFACE=*.*.*.*
+ IP_ADDRESS=*.*.*.*
+ '[' '*.*.*.*' = '*.*.*.*' ']'
+ INTERFACE=eth0
+ BASEDIR=/etc/whereami
+ PUMPFILE=/sbin/pump
+ DHCLIENT=/sbin/dhclient
+ '[' -x /sbin/pump ']'
+ '[' -x /sbin/dhclient ']'
+ /sbin/ifconfig eth0
+ grep -q 'inet addr'
++ ps ax
++ grep dhclient
++ grep eth0
++ cut -c-5
+ dhcli_pid= 1126
 1353
+ '[' -n ' 1126
 1353' ']'
+ kill 1126 1353
+ ps ax
+ grep dhclient
+ grep -q eth0
+ /sbin/dhclient -e eth0
Internet Software Consortium DHCP Client V3.0.1rc9
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on LPF/lo/
Sending on   LPF/lo/
Listening on LPF/eth0/00:e0:98:8a:e6:ca
Sending on   LPF/eth0/00:e0:98:8a:e6:ca
Sending on   Socket/fallback
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 3
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 129.10.244.11
bound to 129.10.246.229 -- renewal in 1405 seconds.
+ ps ax
+ grep dhclient
+ grep -q eth0
++ /sbin/ifconfig eth0
++ head -2
++ tail -1
++ cut -d: -f2
++ cut '-d ' -f1
+ DHCP_ADDRESS=129.10.246.229
+ '[' FOUND = FOUND ']'
+ exit 0
+ IFACE=192.10.244.11
+ IPTOUSE=192.10.244.11
+ IPT

Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
matej wrote:
> Andrew McMillan wrote:
> > The problem will most likely be that "testping" is written to be very
> > fast by using options which are suited to pinging machines on a 10Mb or
> > better LAN.

One more question -- do you think, that installing some caching
DNS server (which one -- the most stupid?) could help?

Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I know of no country in which there is so little independence of
mind and real freedom of discussion as in America.
-- Alexis de Tocqueville



Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
Andrew McMillan wrote:
> The problem will most likely be that "testping" is written to be very
> fast by using options which are suited to pinging machines on a 10Mb or
> better LAN.

OK, I will try that, but I am not sure, whether I have described
well the problem. whereami testing proceeds well (and
/etc/whereami/im correctly contains lines ppp,surfbest), but THEN
when using fping/ping/dig/host on command line it is not able to
find anything.

What is even more strange is that even now, when I am on the
university LAN the things doesn't work. When I do things
manually, i.e.:

cardctl insert
ifconfig eth0 up
dhclient eth0

I get working network connection (ping works like a charm --
although DNS resolution is still slow). However, when I use
whereami (see attached .conf files) it agains detect things
correctly (lan,dhcp,neu in iam file), but DNS resolution again
doesn't work at all (see attached copy of stderr when running
whereami).

/sbin/dhclient is a link to /sbin/dhclient3 and otherwise
everything is plain woody (setmailrelay script is from testing
distribution -- I have exim here). Output from host -v neu.edu
and /var/lib/dhcp3/dhclient.leases are also attached.

   Any thoughts?

  Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I know of no country in which there is so little independence of
mind and real freedom of discussion as in America.
-- Alexis de Tocqueville

eth0
# The (planned) detection configuration file for 'whereami'
# $Id: detect.conf,v 1.3 2003/02/21 19:09:15 root Exp $
#
# This file describes unique features of various environments you connect
# to and associates them with those locations.

# When a test is successful, no further tests will be conducted
# until a subsequent 'if' or 'fi' statement, or if the line is preceded
# by the word 'always'
#
# You may also set environment variables for the scripts (test and action)
# subsequently called by whereami using "set  ".
#
# See man 5 detect.conf for more information.

# The entries below are examples only - you will need to add your own

set DEBUGWHEREAMI 1
default unknown
testmii eth0 lan
# always testpci Lucent bogus1
# always testpci CMD docked,office

if lan
  set INTERFACE eth0
  testdhcp '*.*.*.*' dhcp
  testping192.168.0.3  home
else
  #testmodule   ppp_deflateppp
fi

if dhcp
  #testdhcp192.10.*.*   neu
  testping192.10.244.11neu
  #testdhcp192.*mit
fi

if ppp
  set INTERFACE ppp0
  # testing DNS server
  testping198.6.1.6   surfbest
  #testping198.6.1.6   volny
fi
# Configuration file for setmailrelay of whereami
#
#
# The DEFAULT_RELAY sets the fallback for the mailserver to relay through
#
DEFAULT_RELAY=smtp.surfbest.net
#
# The MAIL_SERVER chooses between sendmail, postfix and exim.  If you omit
# this the system will choose the one it first finds a configuration file
# for, which is normally a safe approach.
#
MAIL_SERVER=exim
# Configuration for whereami during suspend and resume
#
# On suspend/resume, whereami will change to the location specified in
# the config file for SUSPEND_LOCATION and RESUME_LOCATION.
# If the location is 'auto', whereami performs location detection. A blank
# location disables whereami for that event
#

# Uncomment to enable whereami detection on resume.
#  Note: the current apmd may send multiple resume events on wakeup for 
#  Thinkpads, which results in whereami running twice.
RESUME_LOCATION=auto

# Use SUSPEND_LOCATION if you want to set a location on suspend.
#  Note: Your network card may already be suspended at this point, so
#  don't be too surprised if trying to unmount something does not work...
#SUSPEND_LOCATION=undocked

+ /sbin/mii-tool eth0
+ grep 'link ok'
+ exit 0
+ IFACE=*.*.*.*
+ IP_ADDRESS=*.*.*.*
+ '[' '*.*.*.*' = '*.*.*.*' ']'
+ INTERFACE=eth0
+ BASEDIR=/etc/whereami
+ PUMPFILE=/sbin/pump
+ DHCLIENT=/sbin/dhclient
+ '[' -x /sbin/pump ']'
+ '[' -x /sbin/dhclient ']'
+ /sbin/ifconfig eth0
+ grep -q 'inet addr'
++ ps ax
++ grep dhclient
++ grep eth0
++ cut -c-5
+ dhcli_pid= 1126
 1353
+ '[' -n ' 1126
 1353' ']'
+ kill 1126 1353
+ ps ax
+ grep dhclient
+ grep -q eth0
+ /sbin/dhclient -e eth0
Internet Software Consortium DHCP Client V3.0.1rc9
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

Listening on LPF/lo/
Sending on   LPF/lo/
Listening on LPF/eth0/00:e0:98:8a:e6:ca
Sending on   LPF/eth0/00:e0:98:8a:e6:ca
Sending on   Socket/fallback
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 3
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 129.10.244.11
bound to 129.10.246.229 -- renewal in 1405 seconds.
+ ps ax
+ grep dhclient
+ grep -q eth0
++ /sbin/ifconfig eth0
++ head -2
++ tail -1
++ cut -d: -f2
++ cut '-d ' -f1
+ DHCP_ADDRESS=129.10.246.229
+ '[' FOUND = FOUND ']'
+ exit 0
+ IFACE=192.10.244.11
+ IPTOUSE=192.10.244.11
+ IPT

Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
matej wrote:
> Andrew McMillan wrote:
> > The problem will most likely be that "testping" is written to be very
> > fast by using options which are suited to pinging machines on a 10Mb or
> > better LAN.

One more question -- do you think, that installing some caching
DNS server (which one -- the most stupid?) could help?

Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
I know of no country in which there is so little independence of
mind and real freedom of discussion as in America.
-- Alexis de Tocqueville


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-24 Thread Andrew McMillan
On Mon, 2003-02-24 at 18:40, Matej Cepl wrote:
> Matej Cepl wrote:
> > > Realistically I think the best way would be to run whereami
> > > in the up/down hooks with --hint options used to restrict
> > > the detection rulesets.
> > 
> > I have created these two scripts (saved to /etc/ppp/ip-up.d/
> > and /etc/ppp/ip-down.d/ respectively) and all seems to be well.
> 
> Take back -- it doesn't work. I do not know why, but after
> running whereami with attached configuration files ping (or dig,
> host, fping, whichever of them) is not able to make Internet name
> resolution (from smtp.surfbest.net to 216.127.146.11).
> 
> Do you have any idea, what may be the reason?

The problem will most likely be that "testping" is written to be very
fast by using options which are suited to pinging machines on a 10Mb or
better LAN.

You should probably:

 su
 cd /usr/share/whereami/tests
 cp testping testppping
 vi testppping

Change "fping -a -B2 -i5 -r5 -t30" to something like "fping -a" because
the default options are much more suited to pinging across slow links.

Then you can use testppping in your "if ppp" block rather than testping.

Regards,
Andrew.
-- 
-
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267
   Survey for nothing with http://survey.net.nz/ 
-



Re: Whereami with PPP?

2003-02-24 Thread Matej Cepl
Matej Cepl wrote:
> > Realistically I think the best way would be to run whereami
> > in the up/down hooks with --hint options used to restrict
> > the detection rulesets.
> 
> I have created these two scripts (saved to /etc/ppp/ip-up.d/
> and /etc/ppp/ip-down.d/ respectively) and all seems to be well.

Take back -- it doesn't work. I do not know why, but after
running whereami with attached configuration files ping (or dig,
host, fping, whichever of them) is not able to make Internet name
resolution (from smtp.surfbest.net to 216.127.146.11).

Do you have any idea, what may be the reason?

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
[W]hat country can preserve its liberties, if its rulers are not
warned from time to time that [the] people preserve the spirit of
resistance? Let them take arms...The tree of liberty must be
refreshed from time to time, with the blood of patriots and
tyrants.
-- Thomas Jefferson, letter to Col. William S. Smith, 1787

# #
# # Sample configuration file for 'whereami' copyright Andrew McMillan, 1999
# #

# Surfbest
=surfbest setmailrelay smtp.surfbest.net
#+surfbest setresolver search surfbest.net
# tohle je nastavení, které doporučuje www.surfbest.net pro MAC OS7
#=surfbest setresolver search surfbest.net nameserver 209.63.0.2 nameserver 
207.173.86.2

# Volný.cz
=volny setmailrelay smtp.volny.cz
=volny setresolver search volny.cz nameserver 212.20.96.34 nameserver 
212.20.96.38

# NEU
=neu setmailrelay smtp.neu.edu
=neu setresolver search neu.edu nameserver 129.10.1.49 nameserver 155.33.33.62
=neu route add -host 127.0.0.1 lo

# Doma
+home setresolver
+home setmailrelay queue smtp.surfbest.net
+home /etc/init.d/nfs-kernel-server start
-home /etc/init.d/nfs-kernel-server stop

=unknown setmailrelay queue
# The (planned) detection configuration file for 'whereami'
# $Id: detect.conf,v 1.3 2003/02/21 19:09:15 root Exp $
#
# This file describes unique features of various environments you connect
# to and associates them with those locations.

# When a test is successful, no further tests will be conducted
# until a subsequent 'if' or 'fi' statement, or if the line is preceded
# by the word 'always'
#
# You may also set environment variables for the scripts (test and action)
# subsequently called by whereami using "set  ".
#
# See man 5 detect.conf for more information.

# The entries below are examples only - you will need to add your own

set DEBUGWHEREAMI 1
default unknown
testmii eth0 lan
# always testpci Lucent bogus1
# always testpci CMD docked,office

if lan
  set INTERFACE eth0
  testdhcp '*.*.*.*' dhcp
  testping192.168.0.3  home
else
  #testmodule   ppp_deflateppp
fi

if dhcp
  #testdhcp192.10.*.*   neu
  testping192.10.244.11neu
  #testdhcp192.*mit
fi

if ppp
  set INTERFACE ppp0
  # testing DNS server
  testping198.6.1.6   surfbest
  #testping198.6.1.6   volny
fi
#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint ppp


Re: Whereami with PPP?

2003-02-23 Thread Andrew McMillan
On Mon, 2003-02-24 at 18:40, Matej Cepl wrote:
> Matej Cepl wrote:
> > > Realistically I think the best way would be to run whereami
> > > in the up/down hooks with --hint options used to restrict
> > > the detection rulesets.
> > 
> > I have created these two scripts (saved to /etc/ppp/ip-up.d/
> > and /etc/ppp/ip-down.d/ respectively) and all seems to be well.
> 
> Take back -- it doesn't work. I do not know why, but after
> running whereami with attached configuration files ping (or dig,
> host, fping, whichever of them) is not able to make Internet name
> resolution (from smtp.surfbest.net to 216.127.146.11).
> 
> Do you have any idea, what may be the reason?

The problem will most likely be that "testping" is written to be very
fast by using options which are suited to pinging machines on a 10Mb or
better LAN.

You should probably:

 su
 cd /usr/share/whereami/tests
 cp testping testppping
 vi testppping

Change "fping -a -B2 -i5 -r5 -t30" to something like "fping -a" because
the default options are much more suited to pinging across slow links.

Then you can use testppping in your "if ppp" block rather than testping.

Regards,
Andrew.
-- 
-
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267
   Survey for nothing with http://survey.net.nz/ 
-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-23 Thread Matej Cepl
Matej Cepl wrote:
> Andrew McMillan wrote:
> > Realistically I think the best way would be to run whereami in the
> > up/down hooks with --hint options used to restrict the detection
> > rulesets.

I have created these two scripts (saved to /etc/ppp/ip-up.d/ and
/etc/ppp/ip-down.d/ respectively) and all seems to be well.

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
As a rule of thumb, the more qualifiers there are before the name
of a country, the more corrupt the rulers. A country called The
Socialist People's Democratic Republic of X is probably the last
place in the world you'd want to live.
-- Paul Graham discussing (not only) Nigerian spam
   (http://www.paulgraham.com/spam.html)

#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint unknown
#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint ppp


pgpcNP4POuUej.pgp
Description: PGP signature


Re: Whereami with PPP?

2003-02-23 Thread Matej Cepl
Matej Cepl wrote:
> > Realistically I think the best way would be to run whereami
> > in the up/down hooks with --hint options used to restrict
> > the detection rulesets.
> 
> I have created these two scripts (saved to /etc/ppp/ip-up.d/
> and /etc/ppp/ip-down.d/ respectively) and all seems to be well.

Take back -- it doesn't work. I do not know why, but after
running whereami with attached configuration files ping (or dig,
host, fping, whichever of them) is not able to make Internet name
resolution (from smtp.surfbest.net to 216.127.146.11).

Do you have any idea, what may be the reason?

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
[W]hat country can preserve its liberties, if its rulers are not
warned from time to time that [the] people preserve the spirit of
resistance? Let them take arms...The tree of liberty must be
refreshed from time to time, with the blood of patriots and
tyrants.
-- Thomas Jefferson, letter to Col. William S. Smith, 1787

# #
# # Sample configuration file for 'whereami' copyright Andrew McMillan, 1999
# #

# Surfbest
=surfbest setmailrelay smtp.surfbest.net
#+surfbest setresolver search surfbest.net
# tohle je nastavení, které doporučuje www.surfbest.net pro MAC OS7
#=surfbest setresolver search surfbest.net nameserver 209.63.0.2 nameserver 
207.173.86.2

# Volný.cz
=volny setmailrelay smtp.volny.cz
=volny setresolver search volny.cz nameserver 212.20.96.34 nameserver 212.20.96.38

# NEU
=neu setmailrelay smtp.neu.edu
=neu setresolver search neu.edu nameserver 129.10.1.49 nameserver 155.33.33.62
=neu route add -host 127.0.0.1 lo

# Doma
+home setresolver
+home setmailrelay queue smtp.surfbest.net
+home /etc/init.d/nfs-kernel-server start
-home /etc/init.d/nfs-kernel-server stop

=unknown setmailrelay queue
# The (planned) detection configuration file for 'whereami'
# $Id: detect.conf,v 1.3 2003/02/21 19:09:15 root Exp $
#
# This file describes unique features of various environments you connect
# to and associates them with those locations.

# When a test is successful, no further tests will be conducted
# until a subsequent 'if' or 'fi' statement, or if the line is preceded
# by the word 'always'
#
# You may also set environment variables for the scripts (test and action)
# subsequently called by whereami using "set  ".
#
# See man 5 detect.conf for more information.

# The entries below are examples only - you will need to add your own

set DEBUGWHEREAMI 1
default unknown
testmii eth0 lan
# always testpci Lucent bogus1
# always testpci CMD docked,office

if lan
  set INTERFACE eth0
  testdhcp '*.*.*.*' dhcp
  testping192.168.0.3  home
else
  #testmodule   ppp_deflateppp
fi

if dhcp
  #testdhcp192.10.*.*   neu
  testping192.10.244.11neu
  #testdhcp192.*mit
fi

if ppp
  set INTERFACE ppp0
  # testing DNS server
  testping198.6.1.6   surfbest
  #testping198.6.1.6   volny
fi
#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint ppp


Re: Whereami with PPP?

2003-02-23 Thread Matej Cepl
Matej Cepl wrote:
> Andrew McMillan wrote:
> > Realistically I think the best way would be to run whereami in the
> > up/down hooks with --hint options used to restrict the detection
> > rulesets.

I have created these two scripts (saved to /etc/ppp/ip-up.d/ and
/etc/ppp/ip-down.d/ respectively) and all seems to be well.

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
As a rule of thumb, the more qualifiers there are before the name
of a country, the more corrupt the rulers. A country called The
Socialist People's Democratic Republic of X is probably the last
place in the world you'd want to live.
-- Paul Graham discussing (not only) Nigerian spam
   (http://www.paulgraham.com/spam.html)

#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint unknown
#!/bin/sh -e

PATH=/bin:/sbin:/usr/bin:/usr/sbin

# If ppp option is not there, don't do anything here.
if ! [ -f /etc/whereami/whereami.conf ];  then
exit 0
fi

/usr/sbin/whereami --hint ppp


pgp0.pgp
Description: PGP signature


Re: Whereami with PPP?

2003-02-22 Thread Matej Cepl
Andrew McMillan wrote:
> Realistically I think the best way would be to run whereami in the
> up/down hooks with --hint options used to restrict the detection
> rulesets.

So far it seems to work, except that it seems to me, that there
is a bug in whereami setmailrelay script from whereami version
0.2.9. The proper parameter of queue_remote_domains for queue
setting should be IMHO ! * not just *.

   --- setmailrelay 2003/02/22 16:28:47 1.1
   +++ setmailrelay 2003/02/22 16:29:26
   @@ -138,7 +138,7 @@
DEFER="# queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
elif [ "$RELAY" = "queue" ]; then 
   -DEFER="queue_remote_domains = *"
   +DEFER="queue_remote_domains = ! *"
RELAY="$DEFAULT_RELAY"
else 
DEFER="# queue_remote_domains = *"

Thanks for the tip,

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
Economics is the only discipline where two people can win a Nobel
Prize for saying exactly the opposite thing!
-- Eamonn Butler of Adam Smith Institute
   on Nobel Prize awards for year 2001



Re: Whereami with PPP?

2003-02-22 Thread Matej Cepl
jochen issing wrote:
> Actually I don't use whereami, but you could check for the interface
> ppp0, which is shut down after disconnection. HTH,

Unfortunately, this doesn't work, because mii-tool cannot detect
ppp0. However, --hint proposed by Andrew, seems to work.

Thanks for the idea, though,

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
Extremism in the defense of liberty is no vice; moderation in the
pursuit of justice is no virtue.
-- Barry Goldwater (actually written by Karl Hess)



Re: Whereami with PPP?

2003-02-22 Thread Matej Cepl
Andrew McMillan wrote:
> Realistically I think the best way would be to run whereami in the
> up/down hooks with --hint options used to restrict the detection
> rulesets.

So far it seems to work, except that it seems to me, that there
is a bug in whereami setmailrelay script from whereami version
0.2.9. The proper parameter of queue_remote_domains for queue
setting should be IMHO ! * not just *.

   --- setmailrelay 2003/02/22 16:28:47 1.1
   +++ setmailrelay 2003/02/22 16:29:26
   @@ -138,7 +138,7 @@
DEFER="# queue_remote_domains = *"
RELAY="$DEFAULT_RELAY"
elif [ "$RELAY" = "queue" ]; then 
   -DEFER="queue_remote_domains = *"
   +DEFER="queue_remote_domains = ! *"
RELAY="$DEFAULT_RELAY"
else 
DEFER="# queue_remote_domains = *"

Thanks for the tip,

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
Economics is the only discipline where two people can win a Nobel
Prize for saying exactly the opposite thing!
-- Eamonn Butler of Adam Smith Institute
   on Nobel Prize awards for year 2001


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-22 Thread Matej Cepl
jochen issing wrote:
> Actually I don't use whereami, but you could check for the interface
> ppp0, which is shut down after disconnection. HTH,

Unfortunately, this doesn't work, because mii-tool cannot detect
ppp0. However, --hint proposed by Andrew, seems to work.

Thanks for the idea, though,

   Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
Extremism in the defense of liberty is no vice; moderation in the
pursuit of justice is no virtue.
-- Barry Goldwater (actually written by Karl Hess)


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Whereami with PPP?

2003-02-20 Thread Andrew McMillan
On Thu, 2003-02-20 at 15:10, Matej Cepl wrote:
> Hi,
> 
> does anybody have an experience with %subj%? I have this as my
> /etc/whereami/detect.conf, but I do not know, how to reliably
> test for the presence of ppp0 interface (all ppp-related modules
> remain loaded even after disconnection):

Even I don't try and use whereami with ppp connections, but I have
thought about doing so.  I just don't have frequent enough reasons to be
on dialup any more.

Realistically I think the best way would be to run whereami in the
up/down hooks with --hint options used to restrict the detection
rulesets.

Cheers,
Andrew.
-- 
-
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267
   Survey for nothing with http://survey.net.nz/ 
-



Re: Whereami with PPP?

2003-02-20 Thread jochen issing
Hi,

On Wed, Feb 19, 2003 at 09:10:08PM -0500, Matej Cepl wrote:
> Hi,
> 
> does anybody have an experience with %subj%? I have this as my
> /etc/whereami/detect.conf, but I do not know, how to reliably
> test for the presence of ppp0 interface (all ppp-related modules
> remain loaded even after disconnection):

Actually I don't use whereami, but you could check for the interface
ppp0, which is shut down after disconnection. HTH,

jochen

[...]
> 
> Any thoughts?
> 
>Matej
> 
> -- 
> Matej Cepl,
> Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
> 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
>  
> If Patrick Henry thought that taxation without representation was
> bad, he should see how bad it is with representation.
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 

-- 

 jochen issing
 mailto:[EMAIL PROTECTED]
 http://www.mcf-music.de
 GPG:0A121BC8



pgpBbWkG0gUjb.pgp
Description: PGP signature


Re: Whereami with PPP?

2003-02-20 Thread Andrew McMillan
On Thu, 2003-02-20 at 15:10, Matej Cepl wrote:
> Hi,
> 
> does anybody have an experience with %subj%? I have this as my
> /etc/whereami/detect.conf, but I do not know, how to reliably
> test for the presence of ppp0 interface (all ppp-related modules
> remain loaded even after disconnection):

Even I don't try and use whereami with ppp connections, but I have
thought about doing so.  I just don't have frequent enough reasons to be
on dialup any more.

Realistically I think the best way would be to run whereami in the
up/down hooks with --hint options used to restrict the detection
rulesets.

Cheers,
Andrew.
-- 
-
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694OFFICE: +64(4)499-2267
   Survey for nothing with http://survey.net.nz/ 
-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Whereami with PPP?

2003-02-19 Thread jochen issing
Hi,

On Wed, Feb 19, 2003 at 09:10:08PM -0500, Matej Cepl wrote:
> Hi,
> 
> does anybody have an experience with %subj%? I have this as my
> /etc/whereami/detect.conf, but I do not know, how to reliably
> test for the presence of ppp0 interface (all ppp-related modules
> remain loaded even after disconnection):

Actually I don't use whereami, but you could check for the interface
ppp0, which is shut down after disconnection. HTH,

jochen

[...]
> 
> Any thoughts?
> 
>Matej
> 
> -- 
> Matej Cepl,
> Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
> 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
>  
> If Patrick Henry thought that taxation without representation was
> bad, he should see how bad it is with representation.
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 

-- 

 jochen issing
 mailto:[EMAIL PROTECTED]
 http://www.mcf-music.de
 GPG:0A121BC8




msg11241/pgp0.pgp
Description: PGP signature