bugGPSD - Bugs: bug #37377, Device hook script path is...

 
 

bug #37377: Device hook script path is incorrect (leading / is missing)

Submitter:  None
Submitted:  Mon 17 Sep 2012 04:43:44 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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.



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-22 esr Open/ClosedOpen Closed
    2012-09-18 esr StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code