summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init40
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service11
-rw-r--r--meta-oe/recipes-kernel/minicoredumper/minicoredumper_1.0.2.bb31
3 files changed, 82 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
new file mode 100644
index 000000000..90ef7fa37
--- /dev/null
+++ b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.init
@@ -0,0 +1,40 @@
1#!/bin/sh
2#
3# minicoredumper This shell script takes care of starting and stopping minicoredumper.
4#
5# chkconfig: 2345 24 89
6# description: minicoredumper.
7#
8# processname:
9# config: /etc/minicoredumper/
10
11### BEGIN INIT INFO
12# Provides: minicoredumper
13# Default-Start: 2 3 4 5
14# Default-Stop: 0 1 6
15# Should-Start: $syslog $network
16# Should-Stop: $syslog $network
17# Short-Description:
18# Description:
19### END INIT INFO
20
21. /etc/init.d/functions
22
23case "$1" in
24 start)
25 echo "|/usr/bin/minicoredumper %p %u %g %s %t %h %e" > /proc/sys/kernel/core_pattern
26 ;;
27 stop)
28 echo "core" > /proc/sys/kernel/core_pattern
29 ;;
30 status)
31 if grep -q minicoredumper /proc/sys/kernel/core_pattern ; then
32 echo "minicoredumper is running"
33 else
34 echo "minicoredumper is stopped"
35 fi
36 ;;
37 *)
38 echo $"Usage: $0 {start|stop|status}"
39 exit 2
40esac
diff --git a/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
new file mode 100644
index 000000000..851b54ccc
--- /dev/null
+++ b/meta-oe/recipes-kernel/minicoredumper/files/minicoredumper.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Enable minicoredumper.
3
4[Service]
5Type=oneshot
6RemainAfterExit=yes
7ExecStart=/bin/sh -c '/bin/echo "|/usr/bin/minicoredumper %%p %%u %%g %%s %%t %%h %%e" > /proc/sys/kernel/core_pattern'
8ExecStop=/bin/sh -c '/bin/echo "core" > /proc/sys/kernel/core_pattern'
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta-oe/recipes-kernel/minicoredumper/minicoredumper_1.0.2.bb b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_1.0.2.bb
new file mode 100644
index 000000000..babe54448
--- /dev/null
+++ b/meta-oe/recipes-kernel/minicoredumper/minicoredumper_1.0.2.bb
@@ -0,0 +1,31 @@
1SUMMARY = "minicoredumper provides an alternate core dump facility for Linux \
2to allow minimal and customized crash dumps"
3LICENSE = " LGPLv2.1 & BSD"
4LIC_FILES_CHKSUM = "file://COPYING;md5=45445387350de96a0e70410470ee5cab"
5DEPENDS = "elfutils dbus dbus-glib-native glib-2.0 dbus-glib util-linux"
6
7inherit autotools pkgconfig systemd update-rc.d
8
9SRC_URI = "https://linutronix.de/${BPN}/files/${BPN}-${PV}.tar.gz \
10 file://minicoredumper.service \
11 file://minicoredumper.init \
12"
13SRC_URI[md5sum] = "5ba9d116b52a8e2fb93456260644e753"
14SRC_URI[sha256sum] = "1b0eeb3d70dbd2ad6f2f673e4e3446e5dd784e132730e21d8f9dc0977e47dd9a"
15
16SYSTEMD_SERVICE_${PN} = "minicoredumper.service"
17SYSTEMD_AUTO_ENABLE = "enable"
18
19INITSCRIPT_PACKAGES = "${PN}"
20INITSCRIPT_NAME_${PN} = "minicoredumper"
21INITSCRIPT_PARAMS_${PN} = "defaults 89"
22
23do_install_append() {
24 install -d ${D}/${sysconfdir}/minicoredumper
25 cp -rf ${S}/etc/* ${D}/${sysconfdir}/
26
27 install -d ${D}${systemd_system_unitdir}
28 install -m 0644 ${WORKDIR}/minicoredumper.service ${D}${systemd_system_unitdir}
29 install -d ${D}${sysconfdir}/init.d
30 install -m 0644 ${WORKDIR}/minicoredumper.init ${D}${sysconfdir}/init.d/minicoredumper
31}