diff options
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools.inc | 1 | ||||
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools/kdump.service | 12 | ||||
-rw-r--r-- | meta/recipes-kernel/kexec/kexec-tools_2.0.14.bb | 23 |
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" | |||
11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ | 11 | SRC_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 | ||
16 | PR = "r1" | 17 | PR = "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] | ||
2 | Description=Reboot and dump vmcore via kexec | ||
3 | DefaultDependencies=no | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | RemainAfterExit=yes | ||
8 | ExecStart=@LIBEXECDIR@/kdump-helper start | ||
9 | ExecStop=@LIBEXECDIR@/kdump-helper stop | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=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" | |||
34 | RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" | 34 | RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg" |
35 | 35 | ||
36 | FILES_kexec = "${sbindir}/kexec" | 36 | FILES_kexec = "${sbindir}/kexec" |
37 | FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \ | 37 | FILES_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 | |||
39 | FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" | 44 | FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg" |
40 | 45 | ||
41 | inherit update-rc.d | 46 | inherit update-rc.d systemd |
42 | 47 | ||
43 | INITSCRIPT_PACKAGES = "kdump" | 48 | INITSCRIPT_PACKAGES = "kdump" |
44 | INITSCRIPT_NAME_kdump = "kdump" | 49 | INITSCRIPT_NAME_kdump = "kdump" |
45 | INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." | 50 | INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ." |
46 | 51 | ||
47 | do_install_append () { | 52 | do_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 | } |