summaryrefslogtreecommitdiff
path: root/recipes-core/multitech/reset-handler_1.1.bb
blob: 39abaabd9cfa7efd990f809be8e354094e36d650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
DESCRIPTION = "Default reset button handler"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r1"
RDEPENDS_${PN} += "bash"

inherit update-rc.d

INITSCRIPT_NAME = "reset-handler"
INITSCRIPT_PARAMS = "start 95 2 3 4 5 ."
CONFFILES_${PN} = "${sysconfdir}/default/reset-handler"

SRC_URI = "\
  file://reset-handler.sh \
  file://reset-handler.init \
  file://reset-handler.default \
"

do_install () {
    install -d ${D}${sbindir}
    install -m 0755 ${WORKDIR}/reset-handler.sh ${D}${sbindir}/reset-handler

    # init script
    install -d ${D}${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/reset-handler.init ${D}${sysconfdir}/init.d/reset-handler
    
    install -d ${D}${sysconfdir}/default
    install -m 0644 ${WORKDIR}/reset-handler.default ${D}${sysconfdir}/default/reset-handler
}