[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Fixed --enable-systemd on latest Debian stretch. Added xencommons as a systemd.service.



Signed-off by: Sjoer van der Ploeg <sfjuocekr@xxxxxxxxx>
---
 m4/systemd.m4                                     | 15 +++++++++------
 tools/configure.ac                                |  1 +
 tools/hotplug/Linux/systemd/xencommons.service.in | 13 +++++++++++++
 3 files changed, 23 insertions(+), 6 deletions(-)
 create mode 100644 tools/hotplug/Linux/systemd/xencommons.service.in

diff --git a/m4/systemd.m4 b/m4/systemd.m4
index e4b1aa5..8b86c20 100644
--- a/m4/systemd.m4
+++ b/m4/systemd.m4
@@ -41,7 +41,9 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
-       PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
+       PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, [
+               PKG_CHECK_MODULES([SYSTEMD], [libsystemd])
+       ])
        dnl pkg-config older than 0.24 does not set these for
        dnl PKG_CHECK_MODULES() worth also noting is that as of version 208
        dnl of systemd pkg-config --cflags currently yields no extra flags yet.
@@ -83,19 +85,20 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [
        AS_IF([test "x$enable_systemd" != "xno"], [
             AS_IF([test "x$systemd" = "xy" ], [
                AC_DEFINE([HAVE_SYSTEMD], [1], [Systemd available and enabled])
-                       systemd=y
+                       systemd="y"
                        AX_CHECK_SYSTEMD_LIBS()
            ],[
                AS_IF([test "x$enable_systemd" = "xyes"],
                        [AC_MSG_ERROR([Unable to find systemd development 
library])],
-                       [systemd=n])
+                       [systemd="n"])
            ])
-       ],[systemd=n])
+       ],[systemd="n"])
 ])
 
 AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [
-       PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],
-                          [systemd="n"])
+       PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"], [
+               PKG_CHECK_MODULES([SYSTEMD], [libsystemd], [systemd="y"], 
[systemd="n"])
+       ])
 ])
 
 dnl Enables systemd by default and requires a --disable-systemd option flag
diff --git a/tools/configure.ac b/tools/configure.ac
index 5b5dda4..be124f6 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -432,6 +432,7 @@ AS_IF([test "x$systemd" = "xy"], [
     hotplug/Linux/systemd/xen-init-dom0.service
     hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service
     hotplug/Linux/systemd/xen-watchdog.service
+    hotplug/Linux/systemd/xencommons.service
     hotplug/Linux/systemd/xenconsoled.service
     hotplug/Linux/systemd/xendomains.service
     hotplug/Linux/systemd/xenstored.service
diff --git a/tools/hotplug/Linux/systemd/xencommons.service.in 
b/tools/hotplug/Linux/systemd/xencommons.service.in
new file mode 100644
index 0000000..c1fbf8b
--- /dev/null
+++ b/tools/hotplug/Linux/systemd/xencommons.service.in
@@ -0,0 +1,13 @@
+[Unit]
+Description=Xencommons - handles loading requiered modules
+ConditionPathExists=/proc/xen
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
+ExecStart=@CONFIG_DIR@/init.d/xencommons start
+ExecStop=@CONFIG_DIR@/init.d/xencommons stop
+
+[Install]
+WantedBy=multi-user.target
-- 
2.8.0.rc3


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.