]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
virtlockd: improve systemd units
authorMichael Chapman <mike@very.puzzling.org>
Mon, 9 Dec 2013 06:23:25 +0000 (17:23 +1100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 10 Dec 2013 11:02:37 +0000 (12:02 +0100)
- Pass VIRTLOCKD_ARGS through to virtlockd.

- Use SIGUSR1, not SIGHUP, in ExecReload. At present, virtlockd only
  responds to the former.

- Have "systemctl enable virtlockd.service" enable virtlockd.socket,
  rather than throw an error.

- Make virtlockd.socket wanted by sockets.target, rather than
  multi-user.target. This is consistent with other socket units in
  Fedora, and it ensures that the socket is available before libvirtd is
  started.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
src/locking/virtlockd.service.in
src/locking/virtlockd.socket.in

index 0ef9923233224665976d6eaf4bea887e757679ed..a1298a345113132b5820811372c7d74f99638eb6 100644 (file)
@@ -4,9 +4,12 @@ Requires=virtlockd.socket
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/virtlockd
-ExecStart=@sbindir@/virtlockd
-ExecReload=/bin/kill -HUP $MAINPID
+ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
+ExecReload=/bin/kill -USR1 $MAINPID
 # Loosing the locks is a really bad thing that will
 # cause the machine to be fenced (rebooted), so make
 # sure we discourage OOM killer
 OOMScoreAdjust=-900
+
+[Install]
+Also=virtlockd.socket
index a38b1f4d947ffdf38171ebacafa65795d0604d83..9808bbb1bee1eabb08e551fd8c17f7fe77e44511 100644 (file)
@@ -5,4 +5,4 @@ Description=Virtual machine lock manager socket
 ListenStream=@localstatedir@/run/libvirt/virtlockd-sock
 
 [Install]
-WantedBy=multi-user.target
+WantedBy=sockets.target