summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid')
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch46
-rw-r--r--import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/acpid.service10
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/init31
3 files changed, 87 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
new file mode 100644
index 000000000..d1aa3aa17
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
@@ -0,0 +1,46 @@
+From 5d32b65af750e2007730f3d55a552a186aed81a6 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 20 Jan 2016 14:08:29 +0200
+Subject: [PATCH] Fix out of source build
+
+Since the source directory contains another config.h, the build
+directory should be searched first.
+
+Upstream-Status: Submitted
+[https://sourceforge.net/p/acpid2/tickets/10/]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ sock.c | 2 +-
+ ud_socket.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sock.c b/sock.c
+index 644d460..9e04501 100644
+--- a/sock.c
++++ b/sock.c
+@@ -21,7 +21,7 @@
+ */
+
+ #ifdef HAVE_CONFIG_H
+-#include "config.h"
++#include <config.h>
+ #endif
+
+ #include <unistd.h>
+diff --git a/ud_socket.c b/ud_socket.c
+index 1790917..83b2aa9 100644
+--- a/ud_socket.c
++++ b/ud_socket.c
+@@ -4,7 +4,7 @@
+ */
+
+ #ifdef HAVE_CONFIG_H
+-#include "config.h"
++#include <config.h>
+ #endif
+
+ #include <stdio.h>
+--
+2.4.0
+
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/acpid.service b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/acpid.service
new file mode 100644
index 000000000..f70e74096
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/acpid.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=ACPI Event Daemon
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=@SBINDIR@/acpid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/init b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/init
new file mode 100755
index 000000000..40ff385c1
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-bsp/acpid/acpid/init
@@ -0,0 +1,31 @@
+#! /bin/sh -e
+
+test -x /usr/sbin/acpid || exit 0
+test -d /proc/acpi || exit 0
+mkdir -p /etc/acpi/events
+
+case "$1" in
+ start)
+ echo -n "Starting Advanced Configuration and Power Interface daemon: "
+ if [ ! -d /etc/acpi/events ]; then
+ echo "There is not any rule configuration file."
+ else
+ start-stop-daemon -o -S -x /usr/sbin/acpid -- -c /etc/acpi/events
+ echo "acpid."
+ fi
+ ;;
+ stop)
+ echo -n "Stopping Advanced Configuration and Power Interface daemon: "
+ start-stop-daemon -o -K -x /usr/sbin/acpid
+ echo "acpid."
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/acpid {start|stop|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
OpenPOWER on IntegriCloud