mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-08 22:39:56 +00:00
c748037f2a
https://bugzilla.redhat.com/show_bug.cgi?id=830201
The initscript and upstart services depend on dbus starting
before libvirtd. When we first wrote the systemd script, we
tried to do the same, but we depended on dbus.target (which
does not exist) in comparison to network.target (which does
exist), so we removed that in commit 4c7973e
. But we still
need dbus up and running first, especially now that we want
to support shutdown inhibition via dbus (whereas we originally
needed dbus only for firewall control).
http://www.freedesktop.org/software/systemd/man/systemd.target.html
explains how a target (such as network.target) is just a collection
of common services bundled together, and why we want network.target
but dbus.service.
* daemon/libvirtd.service.in (Unit): Depend on dbus starting
first.
22 lines
627 B
SYSTEMD
22 lines
627 B
SYSTEMD
# NB we don't use socket activation. When libvirtd starts it will
|
|
# spawn any virtual machines registered for autostart. We want this
|
|
# to occur on every boot, regardless of whether any client connects
|
|
# to a socket. Thus socket activation doesn't have any benefit
|
|
|
|
[Unit]
|
|
Description=Virtualization daemon
|
|
Before=libvirt-guests.service
|
|
After=network.target
|
|
After=dbus.service
|
|
|
|
[Service]
|
|
EnvironmentFile=-/etc/sysconfig/libvirtd
|
|
ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
KillMode=process
|
|
# Override the maximum number of opened files
|
|
#LimitNOFILE=2048
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|