On 05/17/2018 06:52 AM,  Christian Ehrhardt  wrote:
> GPSD calls systemd helpers for the service which will end up in *inst 
> maintainer scripts.
> in d/rules are:
>   dh_systemd_enable -pgpsd                                                    
>  
>   dh_installinit                                                              
>  
>   dh_systemd_start -pgpsd --restart-after-upgrade
> That sequence should make it available and started after install in all cases.

On various systems that I have tried, simply installing gpsd does not
cause it to run on boot, you need to connect to the socket before gpsd
is actually started. That makes it unhelpful for chrony because it needs
to start automatically on boot. The unit files correctly handle the
sequencing (gpsd after chrony) but I needed to add a symlink for
multi-user.target in order to get gpsd running on boot without having
something to connect to the socket. chrony doesn't connect to the
socket, chrony makes it's own different socket that gpsd detects and
writes to, independently of the gpsd socket.

The odd thing is that one of my systems already had the multi-user
target, which is why THAT system had gpsd running on boot. I have
nothing in my command history there showing me creating it. This machine
is an older machine that has been upgraded since at least Xenial,
possibly even pre-Xenial, so it may be that an older gpsd package did
something.

The only surprise is needing to manually create the multi-user.target
dependency for use with chrony. Ideally, the gpsd packaging would detect
cases where chrony is offering it's special socket, and gpsd would be
activated accordingly, but I can't think of an obvious way to depend on
the existence of a file matching a particular filename schema
('/var/run/chrony.ttyXXX.sock'). If systemd does support that sort of
funky file-exists dependency, then we could try adding that.

Mark

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1771080

Title:
  gpsd should start after chrony if they are being used together

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chrony/+bug/1771080/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to