blob: 83f52d4dae3e40c2709f82243ad27d984ce3490b [file] [log] [blame]
Brad Bishop75f03872018-11-03 09:41:57 -07001LICENSE = "Apache-2.0"
Brad Bishop6f3f0aa2019-09-13 12:14:05 -04002LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
Brad Bishop75f03872018-11-03 09:41:57 -07003
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06004SRC_URI += "file://init"
5
Ed Tanous9936f862022-09-19 09:13:20 -07006inherit 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
Patrick Williams12fc9392021-08-06 09:16:53 -050016FILES:${PN} += "${base_sbindir}/init"
Edward A. Jamesc03b9c42017-11-09 16:03:14 -060017
Brad Bishop5a3f4f12018-01-26 22:01:15 -050018ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
Brad Bishop5a3f4f12018-01-26 22:01:15 -050019# Use a number higher than the systemd init alternative so that
20# ours is enabled instead.
21ALTERNATIVE_PRIORITY[init] ?= "400"
Ed Tanous9936f862022-09-19 09:13:20 -070022
23ALTERNATIVE:${PN} = "init"
24ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"