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