Mon 17 Sep 2012 04:43:44 PM UTC, original submission:
While attempting to utilise a device-hook script located at /etc/gpsd/device-hook as per the documentation, I received the following message whilst running with debug as normal user from command line:
gpsd:PROG: no etc/gpsd/device-hook present, skipped running DEACTIVATE hook
If gpsd is started from command line after first doing 'cd /', then the device-hook script is found and run, indicating gpsd is indeed looking for etc/gpsd/device-hook instead of /etc/gpsd/device-hook. Some grepping of the source confirms this.
gpsd.h:#define SYSCONFDIR "etc"
gpsd.h:#define DEVICEHOOKPATH SYSCONFDIR"/gpsd/device-hook"
Changing line 180 of SConstruct by adding the '/' and rebuilding seems to solve the problem.
("sysconfdir", "/etc", "system configuration directory")
Now gpsd finds the device-hook script:
gpsd:INFO: running /etc/gpsd/device-hook /dev/ttyUSB0 DEACTIVATE
gpsd:INFO: /etc/gpsd/device-hook returned 0
Tested with Ubuntu 12.04 package and also with version 3.7 compiled from source.
|