blob: 9510f7bbdd35222c510e7ad8989adf61183d1cc3 (
plain)
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
41
42
|
#! /bin/sh
me=`basename $0`
dir=`dirname $0`
LOGGER="logger -i -t '$me'"
# Always redirect stderr somewhere, otherwise the shell script will die
# when it tries to do I/O related stuff on closed file descriptor.
# Our default is to throw it down the bit-bucket.
#exec 2> /dev/console
## If you wish to trace this script:
#exec 2> "/tmp/${me}_$XBUS_NAME" 1>&2
PATH="$dir:/usr/sbin:/sbin:/usr/bin:/bin"
set -e
echo "starting($ACTION): '$*'" | $LOGGER
case "$ACTION" in
add)
;;
remove)
;;
online)
if [ -x "$dir/twinstar_hook" ]; then
"$dir/twinstar_hook"
fi
;;
offline)
if [ -x "$dir/twinstar_hook" ]; then
"$dir/twinstar_hook"
fi
;;
*)
echo "$0: Unknown ACTION='$ACTION'" | $LOGGER
echo "$0: ARGS='$*'" | $LOGGER
echo "$0: ENV:" | $LOGGER
env | $LOGGER
exit 1
esac
|