[xen] improve systemd functionality
myoung
myoung at fedoraproject.org
Thu Sep 29 19:34:33 UTC 2011
commit 0d7731680728b2fe46a5dc3f29fa1336c858e1ba
Author: Michael Young <m.a.young at durham.ac.uk>
Date: Thu Sep 29 20:33:50 2011 +0100
improve systemd functionality
proc-xen.mount | 2 ++
var-lib-xenstored.mount | 1 +
xen.spec | 7 ++++++-
xenstored.service | 2 ++
4 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/proc-xen.mount b/proc-xen.mount
index 7d24ea5..0eaa59c 100644
--- a/proc-xen.mount
+++ b/proc-xen.mount
@@ -1,5 +1,7 @@
[Unit]
Description=Mount /proc/xen files
+ConditionPathExists=/proc/xen
+RefuseManualStop=true
[Mount]
What=xenfs
diff --git a/var-lib-xenstored.mount b/var-lib-xenstored.mount
index c6b9ccb..eaef879 100644
--- a/var-lib-xenstored.mount
+++ b/var-lib-xenstored.mount
@@ -2,6 +2,7 @@
Description=mount xenstore file system
Requires=proc-xen.mount
After=proc-xen.mount
+RefuseManualStop=true
[Mount]
What=xenstore
diff --git a/xen.spec b/xen.spec
index 68f53a2..3ea5c5a 100644
--- a/xen.spec
+++ b/xen.spec
@@ -6,7 +6,7 @@
Summary: Xen is a virtual machine monitor
Name: xen
Version: 4.1.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Group: Development/Libraries
License: GPLv2+ and LGPLv2+ and BSD
URL: http://xen.org/
@@ -335,6 +335,7 @@ fi
/sbin/chkconfig --add xenconsoled
/sbin/chkconfig --add xenstored
#/sbin/chkconfig --add blktapctrl
+/bin/systemctl enable xenstored
if [ $1 != 0 ]; then
service xenconsoled condrestart
@@ -345,6 +346,7 @@ if [ $1 = 0 ]; then
/sbin/chkconfig --del xenconsoled
/sbin/chkconfig --del xenstored
/sbin/chkconfig --del blktapctrl
+ /bin/systemctl disable xenstored
fi
%post libs -p /sbin/ldconfig
@@ -560,6 +562,9 @@ rm -rf %{buildroot}
%doc licensedir/*
%changelog
+* Thu Sep 29 2011 Michael Young <m.a.young at durham.ac.uk> - 4.1.1-5
+- improve systemd functionality
+
* Wed Sep 28 2011 Michael Young <m.a.young at durham.ac.uk> - 4.1.1-4
- lsb header fixes - xenconsoled shutdown needs xenstored to be running
- partial migration to systemd to fix shutdown delays
diff --git a/xenstored.service b/xenstored.service
index 93256b3..5bfb47e 100644
--- a/xenstored.service
+++ b/xenstored.service
@@ -3,12 +3,14 @@ Description=Xenstored - daemon managing xenstore file system
Requires=proc-xen.mount var-lib-xenstored.mount
After=proc-xen.mount var-lib-xenstored.mount
Before=libvirtd.service libvirt-guests.service
+RefuseManualStop=true
[Service]
Type=forking
Environment=XENSTORED_ARGS=
EnvironmentFile=-/etc/sysconfig/xenstored
PIDFile=/var/run/xenstored.pid
+ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
ExecStart=/usr/sbin/xenstored --pid-file /var/run/xenstored.pid $XENSTORED_ARGS
[Install]
More information about the scm-commits
mailing list