diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2014-08-25 12:34:19 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-25 07:43:58 -0400 |
commit | ffb6b67608c216db349af87b855495244301319a (patch) | |
tree | c350bca366316198492ebf29f3d421362086efa5 /systemd | |
parent | 2f7a78002f012c7ed322767cf3e413b961a640b4 (diff) | |
download | gpsd-ffb6b67608c216db349af87b855495244301319a.tar.gz |
Update systemd files.
- use $OPTIONS and include /etc/sysconfig/gpsd to make it compatible
with current Fedora packaging
- start gpsd after chronyd service to allow connecting to SOCK
- allow enabling gpsd as a normal service not requiring socket
activation
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/gpsd.service | 5 | ||||
-rw-r--r-- | systemd/gpsdctl@.service | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/systemd/gpsd.service b/systemd/gpsd.service index ef760a1e..ad4be793 100644 --- a/systemd/gpsd.service +++ b/systemd/gpsd.service @@ -1,11 +1,14 @@ [Unit] Description=GPS (Global Positioning System) Daemon Requires=gpsd.socket +# Needed with chrony SOCK refclock +After=chronyd.service [Service] EnvironmentFile=-/etc/default/gpsd EnvironmentFile=-/etc/sysconfig/gpsd -ExecStart=/usr/sbin/gpsd -N $GPSD_OPTIONS $DEVICES +ExecStart=/usr/sbin/gpsd -N $GPSD_OPTIONS $OPTIONS $DEVICES [Install] +WantedBy=multi-user.target Also=gpsd.socket diff --git a/systemd/gpsdctl@.service b/systemd/gpsdctl@.service index 58c5176d..26e49a28 100644 --- a/systemd/gpsdctl@.service +++ b/systemd/gpsdctl@.service @@ -8,6 +8,7 @@ After=dev-%i.device Type=oneshot Environment="GPSD_SOCKET=/var/run/gpsd.sock" EnvironmentFile=-/etc/default/gpsd +EnvironmentFile=-/etc/sysconfig/gpsd RemainAfterExit=yes ExecStart=/bin/sh -c "[ \"$USBAUTO\" = true ] && /usr/sbin/gpsdctl add /dev/%I || :" ExecStop=/bin/sh -c "[ \"$USBAUTO\" = true ] && /usr/sbin/gpsdctl remove /dev/%I || :" |