summaryrefslogtreecommitdiff
path: root/gpsd.hotplug.wrapper
blob: d4c5fbd6eb94012646a7f75525ee5d419b7c2f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/sh
# $Id$

if [ "$ACTION" == "remove" ] ; then
  if [ $(echo $DEVLINKS | grep -q /dev/gps) ] ; then
    exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
  fi
  exit 0
fi

. /lib/udev/hotplug.functions

# wait for /usr & /var to be mounted
wait_for_file /usr/bin/python && \
wait_for_file /var/run && \
  exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"