#!/bin/sh
#
# $Id: whereami.network-hook,v 1.3 2004/05/19 21:39:58 andrew Exp $
#
# Hook for whereami to run when network is being brought up
# Andrew McMillan <awm@debian.org>
#
# Not a lot to do, AFAICS - just call whereami...
#
# Unless it is going to get really complicated we will use the same
# script in all situations, so we need the name we were called by.
# We only run in pre-up phase because that is where network detection
# generally needs to happen.  Possibly we could run something post-up
# but whereami ain't architected that way.
#

# Just exit if whereami is no longer installed
test ! -e /usr/sbin/whereami && exit 1

SITUATION=`basename \`dirname $0\` .d`

# Can't use --syslog because syslog starts after the network (bug #160187)
/usr/sbin/whereami --run_from ${SITUATION} --hint ${SITUATION}

exit 0

