xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fixed --enable-systemd on latest Debian stretch. Added xencommons as a systemd.service.
@ 2016-03-31 20:35 Sjoer van der Ploeg
  2016-04-01 15:17 ` Wei Liu
  0 siblings, 1 reply; 12+ messages in thread
From: Sjoer van der Ploeg @ 2016-03-31 20:35 UTC (permalink / raw)
  To: xen-devel; +Cc: sfjuocekr

Signed-off by: Sjoer van der Ploeg <sfjuocekr@gmail.com>
---
 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@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-04 11:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-31 20:35 [PATCH] Fixed --enable-systemd on latest Debian stretch. Added xencommons as a systemd.service Sjoer van der Ploeg
2016-04-01 15:17 ` Wei Liu
     [not found]   ` <CAGj-wbFHgSe=NJ5L3U6Cno5U6k3XWfy16F3PNhwx6X5Q7GqT4Q@mail.gmail.com>
2016-04-01 15:57     ` Wei Liu
     [not found]       ` <CAGj-wbFYyMgfxpf8sWJnUukFe3fWp9BAKYChPmW3+NY7Tj=ggQ@mail.gmail.com>
2016-04-01 17:01         ` Wei Liu
2016-04-01 17:14           ` Sjoer van der Ploeg
2016-04-01 19:43           ` Olaf Hering
2016-04-02  0:45             ` Sjoer van der Ploeg
2016-04-02 10:59               ` Wei Liu
2016-04-02 11:12                 ` Wei Liu
2016-04-02 11:24                 ` Sjoer van der Ploeg
2016-04-04 10:30                   ` Wei Liu
     [not found]                     ` <CAGj-wbENk7vqdd-00kD2NASpEZcDb+uruAR_whgjySCJognJfA@mail.gmail.com>
2016-04-04 11:33                       ` Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).