File: gpsd.hotplug.wrapper

package info (click to toggle)
gpsd 2.37-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,564 kB
  • ctags: 2,813
  • sloc: ansic: 20,476; sh: 9,233; xml: 2,910; python: 1,764; php: 472; makefile: 440; cpp: 121
file content (23 lines) | stat: -rw-r--r-- 558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
# $Id: gpsd.hotplug.wrapper 4669 2008-01-21 15:07:00Z esr $

#debian addition:
[ ! -r /etc/default/gpsd ] || . /etc/default/gpsd
[ "$START_DAEMON" = "true" ] || exit 0
[ "$USBAUTO" = "true" ] || exit 0


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"