1LICENSE = "Apache-2.0"
2LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
3
4SRC_URI += "file://init"
5
6inherit allarch
7inherit update-alternatives
8
9do_install() {
10        install -d ${D}/${base_sbindir}
11        install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
12}
13
14RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
15
16FILES:${PN} += "${base_sbindir}/init"
17
18ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
19# Use a number higher than the systemd init alternative so that
20# ours is enabled instead.
21ALTERNATIVE_PRIORITY[init] ?= "400"
22
23ALTERNATIVE:${PN} = "init"
24ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"
25