summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools.inc1
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/kdump.service12
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb23
3 files changed, 31 insertions, 5 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index bdfe024a79..c689bec1f9 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -11,6 +11,7 @@ DEPENDS = "zlib xz"
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ 11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
12 file://kdump \ 12 file://kdump \
13 file://kdump.conf \ 13 file://kdump.conf \
14 file://kdump.service \
14" 15"
15 16
16PR = "r1" 17PR = "r1"
diff --git a/meta/recipes-kernel/kexec/kexec-tools/kdump.service b/meta/recipes-kernel/kexec/kexec-tools/kdump.service
new file mode 100644
index 0000000000..4e65a46ac4
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/kdump.service
@@ -0,0 +1,12 @@
1[Unit]
2Description=Reboot and dump vmcore via kexec
3DefaultDependencies=no
4
5[Service]
6Type=oneshot
7RemainAfterExit=yes
8ExecStart=@LIBEXECDIR@/kdump-helper start
9ExecStop=@LIBEXECDIR@/kdump-helper stop
10
11[Install]
12WantedBy=multi-user.target
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
index bd89720e5b..0f6398f13e 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb
@@ -34,19 +34,32 @@ ALLOW_EMPTY_${PN} = "1"
34RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" 34RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
35 35
36FILES_kexec = "${sbindir}/kexec" 36FILES_kexec = "${sbindir}/kexec"
37FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \ 37FILES_kdump = "${sbindir}/kdump \
38 ${sysconfdir}/sysconfig/kdump.conf" 38 ${sysconfdir}/sysconfig/kdump.conf \
39 ${sysconfdir}/init.d/kdump \
40 ${libexecdir}/kdump-helper \
41 ${systemd_unitdir}/system/kdump.service \
42"
43
39FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" 44FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
40 45
41inherit update-rc.d 46inherit update-rc.d systemd
42 47
43INITSCRIPT_PACKAGES = "kdump" 48INITSCRIPT_PACKAGES = "kdump"
44INITSCRIPT_NAME_kdump = "kdump" 49INITSCRIPT_NAME_kdump = "kdump"
45INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." 50INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
46 51
47do_install_append () { 52do_install_append () {
48 install -d ${D}${sysconfdir}/init.d
49 install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
50 install -d ${D}${sysconfdir}/sysconfig 53 install -d ${D}${sysconfdir}/sysconfig
51 install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig 54 install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
55
56 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
57 install -D -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
58 fi
59
60 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
61 install -D -m 0755 ${WORKDIR}/kdump ${D}${libexecdir}/kdump-helper
62 install -D -m 0644 ${WORKDIR}/kdump.service ${D}${systemd_unitdir}/system/kdump.service
63 sed -i -e 's,@LIBEXECDIR@,${libexecdir},g' ${D}${systemd_unitdir}/system/kdump.service
64 fi
52} 65}