From: Olaf Hering Subject: [PATCH 5/7] tools/hotplug: systemd xenstored dependencies Date: Fri, 24 Oct 2014 16:17:08 +0200 Message-ID: <1414160230-15131-6-git-send-email-olaf@aepfle.de> References: <1414160230-15131-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1414160230-15131-1-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Olaf Hering , Wei Liu , Ian Campbell , Stefano Stabellini , Ian Jackson , M A Young List-Id: xen-devel@lists.xenproject.org Everything which uses xenstored does this via the socket. Update the existing service files to enable the xenstored.socket with the Requires= statement. And schedule startup of the given service files after the socket is enabled with the After= statement. Once something tries to access the socket systemd will launch xenstored. Signed-off-by: Olaf Hering Cc: Ian Campbell Cc: Ian Jackson Cc: Stefano Stabellini Cc: Wei Liu --- tools/hotplug/Linux/systemd/xen-init-dom0.service.in | 2 +- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 2 +- tools/hotplug/Linux/systemd/xenconsoled.service.in | 2 +- tools/hotplug/Linux/systemd/xendomains.service.in | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/hotplug/Linux/systemd/xen-init-dom0.service.in b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in index e947760..3ed1633 100644 --- a/tools/hotplug/Linux/systemd/xen-init-dom0.service.in +++ b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in @@ -1,7 +1,7 @@ [Unit] Description=xen-init-dom0, initialise Dom0 configuration (xenstore nodes, JSON configuration stub) Requires=xenstored.socket -After=xenstored.service +After=xenstored.socket ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in index 52101af..0b9c2e5 100644 --- a/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +++ b/tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in @@ -1,7 +1,7 @@ [Unit] Description=qemu for xen dom0 disk backend Requires=proc-xen.mount var-lib-xenstored.mount xenstored.socket -After=xenstored.service xenconsoled.service +After=xenstored.socket xenconsoled.service Before=xendomains.service libvirtd.service libvirt-guests.service RefuseManualStop=true ConditionPathExists=/proc/xen/capabilities diff --git a/tools/hotplug/Linux/systemd/xenconsoled.service.in b/tools/hotplug/Linux/systemd/xenconsoled.service.in index 6ab0fc1..d3b85a5 100644 --- a/tools/hotplug/Linux/systemd/xenconsoled.service.in +++ b/tools/hotplug/Linux/systemd/xenconsoled.service.in @@ -1,7 +1,7 @@ [Unit] Description=Xenconsoled - handles logging from guest consoles and hypervisor Requires=xenstored.socket -After=xenstored.service +After=xenstored.socket ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xendomains.service.in b/tools/hotplug/Linux/systemd/xendomains.service.in index 3ed4892..214da7a 100644 --- a/tools/hotplug/Linux/systemd/xendomains.service.in +++ b/tools/hotplug/Linux/systemd/xendomains.service.in @@ -1,7 +1,7 @@ [Unit] Description=Xendomains - start and stop guests on boot and shutdown Requires=xenstored.socket -After=xenstored.service xenconsoled.service xen-init-dom0.service +After=xenstored.socket xenconsoled.service xen-init-dom0.service ConditionPathExists=/proc/xen/capabilities [Service]