This file is indexed.

/etc/network/if-pre-up.d/whereami is in whereami 0.3.34-0.4.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
#
# $Id: whereami.network-hook,v 1.5 2006/11/12 00:39:14 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.
#

# Quit if we're called for the loopback
[ "$IFACE" = lo ] && exit 0

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

EXTRA_HINT=""
SITUATION=`basename \`dirname $0\` .d`
if [ "$SITUATION" = "pre-up" ] ; then
  EXTRA_HINT=',netstart'
fi

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

exit 0