/etc/apm/scripts.d/whereami is in whereami 0.3.34-0.3.
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 33 34 35 36 37 38 39 40 | #!/bin/sh
# $Id: whereami.apm,v 1.6 2004/01/09 12:05:50 andrew Exp $
# This script will run whereami on suspend and resume of the machine.
# If you have logger installed, whereami output will be sent to syslog.
#
# 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.
#
# For example:
# SUSPEND_LOCATION=disconnected
# RESUME_LOCATION=auto
WHEREAMI=/usr/sbin/whereami
CONFIG=/etc/whereami/apm.conf
[ -r $CONFIG ] || exit 0
[ -x $WHEREAMI ] || exit 0
. $CONFIG
case "$1,$2" in
suspend,*|standby,*)
LOCATION=$SUSPEND_LOCATION
;;
resume,suspend|resume,standby)
LOCATION=$RESUME_LOCATION
;;
esac
[ -n "$LOCATION" ] || exit 0
[ "$LOCATION" = "auto" ] && LOCATION=
if [ -x /usr/bin/logger ] ; then
logger -t whereami "APM event $1 $2 whereami $LOCATION"
$WHEREAMI --run_from apm --syslog $LOCATION | logger -t whereami
else
$WHEREAMI --run_from apm --syslog $LOCATION
fi
|