From: Olaf Hering Subject: [PATCH 6/7] tools/hotplug: every systemd service depends on proc-xen.mount Date: Fri, 24 Oct 2014 16:17:09 +0200 Message-ID: <1414160230-15131-7-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 Every systemd service file uses /proc/xen/capabilites to check if it runs in a dom0. Update every service file to enable proc-xen.mount with the Requires= statement and schedule its startup with the After= statement. In some places var-lib-xenstored.mount is removed. This is ok because its optional and this unit is enabled by xenstored itself. After all its a private directory for 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 | 4 ++-- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 4 ++-- tools/hotplug/Linux/systemd/xenconsoled.service.in | 4 ++-- tools/hotplug/Linux/systemd/xendomains.service.in | 4 ++-- tools/hotplug/Linux/systemd/xenstored.socket.in | 2 ++ tools/hotplug/Linux/systemd/xenstored_ro.socket.in | 2 ++ 6 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/hotplug/Linux/systemd/xen-init-dom0.service.in b/tools/hotplug/Linux/systemd/xen-init-dom0.service.in index 3ed1633..4d4cb23 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.socket +Requires=xenstored.socket proc-xen.mount +After=xenstored.socket proc-xen.mount 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 0b9c2e5..1e21abb 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.socket xenconsoled.service +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount 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 d3b85a5..e6cb853 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.socket +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount 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 214da7a..757278f 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.socket xenconsoled.service xen-init-dom0.service +Requires=proc-xen.mount xenstored.socket +After=proc-xen.mount xenstored.socket xenconsoled.service xen-init-dom0.service ConditionPathExists=/proc/xen/capabilities [Service] diff --git a/tools/hotplug/Linux/systemd/xenstored.socket.in b/tools/hotplug/Linux/systemd/xenstored.socket.in index 9b28e74..2e8ee04 100644 --- a/tools/hotplug/Linux/systemd/xenstored.socket.in +++ b/tools/hotplug/Linux/systemd/xenstored.socket.in @@ -1,5 +1,7 @@ [Unit] Description=xenstore socket +Requires=proc-xen.mount var-lib-xenstored.mount +After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket] diff --git a/tools/hotplug/Linux/systemd/xenstored_ro.socket.in b/tools/hotplug/Linux/systemd/xenstored_ro.socket.in index 80402b3..140ad94 100644 --- a/tools/hotplug/Linux/systemd/xenstored_ro.socket.in +++ b/tools/hotplug/Linux/systemd/xenstored_ro.socket.in @@ -1,5 +1,7 @@ [Unit] Description=xenstore ro socket +Requires=proc-xen.mount var-lib-xenstored.mount +After=proc-xen.mount var-lib-xenstored.mount ConditionPathExists=/proc/xen/capabilities [Socket]