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

Re: [ITR] templates://gpsd/{gpsd.templates}



Justin B Rye wrote:
> Bernd Zeimetz wrote:
>> Justin B Rye wrote:
>>> Does this also control whether it's started right now, on install?
>> Yes, as usual the dameon is started after install.
>>
> [...]
>>> But I'd also like to know _why_ autostarting is "necessary for USB
>>> autodetection". 
>> The udev hook script connects to gpsd via a socket provided by a running gpsd
>> and tells the dameon that there is a new device to take care of. It also
>> notifies the daemon when the device was removed.
> 
> How does this make autostarting "necessary for USB autodetection"?
> If it requires some sort of udev initialisation that can only
> happen at boot time, how does it start on install?

Udev executes a script which tries to talk to gpsd, which needs to run. Udev
happily reloads new rules as soon as they're installed, all you needto do is to
start gpsd. And gpsd should be started by default after the installation like
any other daemon.

>>> If I ran "sudo /etc/init.d/gpsd start" manually
>>> just before plugging the device in, what exactly would go wrong?
>> It won't start, as the init script reads /etc/defaults/gpsd, which is created
>> from the debconf questions. You could run gpsd -F /var/run/gpsd.sock manually.
> 
> Now it sounds as if you're saying that autostarting _isn't_
> necessary for USB autodetection.

It is necessary to have a running gpsd for USB autodetection.


>> The usual way is just to start gpsd at boot and only to disabl it if you really
>> need to.
> 
> In that case why is gpsd/start_daemon "Default: false"?

Oh thanks for spotting that. That was supposed to be true, it was disabled
before as there were reports about troubles with gpsd and USB serial devices.
But they should not happen (anymore)...

-- 
 Bernd Zeimetz                             Debian GNU/Linux Developer
 GPG Fingerprints: 06C8 C9A2 EAAD E37E 5B2C BE93 067A AD04 C93B FF79
                   ECA1 E3F2 8E11 2432 D485 DD95 EB36 171A 6FF9 435F


Reply to: