1ff075f6eSBrad Bishopinherit allarch
2ff075f6eSBrad Bishopinherit update-alternatives
3ff075f6eSBrad Bishop
475f0387bSBrad BishopLICENSE = "Apache-2.0"
5*6f3f0aa7SBrad BishopLIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
675f0387bSBrad Bishop
7ff075f6eSBrad BishopRDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
8ff075f6eSBrad Bishop
9ff075f6eSBrad BishopSRC_URI += "file://init"
10ff075f6eSBrad Bishop
11ff075f6eSBrad BishopFILES_${PN} += "${base_sbindir}/init"
12ff075f6eSBrad Bishop
13ff075f6eSBrad Bishopdo_install() {
14ff075f6eSBrad Bishop	install -d ${D}/${base_sbindir}
15ff075f6eSBrad Bishop	install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
16ff075f6eSBrad Bishop}
17ff075f6eSBrad Bishop
18ff075f6eSBrad BishopALTERNATIVE_${PN} = "init"
19ff075f6eSBrad BishopALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"
20ff075f6eSBrad BishopALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
21ff075f6eSBrad Bishop
22ff075f6eSBrad Bishop# Use a number higher than the systemd init alternative so that
23ff075f6eSBrad Bishop# ours is enabled instead.
24ff075f6eSBrad BishopALTERNATIVE_PRIORITY[init] ?= "400"
25