gpsd hotplug wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a usb to serial adapter on my PC. From time to time I attach a
Garmin etrex GPS to it and transfer data using gpsbabel. This all
works well and has done for years.

F14 (and probably older versions) includes gpsd. Possibly this works
better - I've not tried it. I use KDE and kde depends on it, so it has
to stay. Unfortunately gpsd comes with /lib/udev/gpsd.hotplug.wrapper.
This is a shell script which includes this:


wait_for_file() {
    [ -e "$1" ] && return 0
    local count=0
    while sleep 1; do
        count=$(( $count + 1 ))
         [ -e "$1" ] && return 0
        if [ $count -gt 60 ]; then
            return 1
        fi
    done
}

# 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"

This script as executed by the udev startup process on every boot. Of
course it always fails, but only after a 60 second delay.

Maybe there are occasions when /usr/bin/python or /var/run will appear
during the execution of this script, but I can't think of any - and it
certainly isn't the case at boot time.

My system is switched off when it's not being used, so I tend to
notice any boot delays.

I think I should raise a bug for this, but I'm not certain what to
suggest for a solution. I think replacing the last part as follows
should work:

[ -e "/usr/bin/python" ] &&
[ -e "/var/run" ] &&
  exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"

Alternatively gpsd could be split up into the libraries (needed by
kde) and the udev stuff (only needed if you plug in a gps).

Comments?

Regards,

Chris
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux