Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Application:Geo
gpsd
udev.gpsd
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File udev.gpsd of Package gpsd
#!/bin/bash CTRL_SOCK="/run/gpsd.socket" DEV_NAME="/run/gpsd.device" . /etc/sysconfig/gpsd if [ "$GPSD_STARTBYUDEV" != "yes" ]; then exit 1 fi if [ "${ACTION}" = "remove" ]; then GPSD_PID=$(pidof gpsd) if [ -z "$GPSD_PID" ]; then echo "Can't find gpsd!" else echo "Remove gpsd from pid: ${GPSD_PID}" TTYDEV="/dev/$(basename $DEVPATH)" TTYDEV_SAVE=$(cat ${DEV_NAME}) if [ "${TTYDEV}" = "${TTYDEV_SAVE}" ]; then # send TERM signal kill -15 ${GPSD_PID} rm -f ${DEV_NAME} fi fi else case "$DEVPATH" in *tty*) TTYDEV="/dev/$(basename $DEVPATH)" options="-F $CTRL_SOCK $GPSD_OPTIONS" if [ -n "$GPSD_PORT" ]; then options="$options -S $GPSD_PORT" else GPSD_PORT=2947 fi echo "Action '${ACTION}' Launch gpsd to $TTYDEV with $options" /usr/sbin/gpsd $options ${TTYDEV} echo "${TTYDEV}" > ${DEV_NAME} (sleep 1 && echo "F=$TTYDEV" >/dev/tcp/localhost/$GPSD_PORT) & ;; esac fi 2>&1 | /bin/logger -t gpsd
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor