All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sjoer van der Ploeg <sfjuocekr@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: sfjuocekr@gmail.com
Subject: [PATCH] Fixed --enable-systemd on latest Debian stretch. Added xencommons as a systemd.service.
Date: Thu, 31 Mar 2016 22:35:25 +0200	[thread overview]
Message-ID: <1459456525-13897-1-git-send-email-sfjuocekr@gmail.com> (raw)

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

             reply	other threads:[~2016-03-31 20:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 20:35 Sjoer van der Ploeg [this message]
2016-04-01 15:17 ` [PATCH] Fixed --enable-systemd on latest Debian stretch. Added xencommons as a systemd.service 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459456525-13897-1-git-send-email-sfjuocekr@gmail.com \
    --to=sfjuocekr@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.