blob: 934d8da5f5d9e9e156953bc5b962643dfc388e36 [file] [log] [blame]
Brad Bishop5f2973f2018-02-26 15:13:42 -05001inherit allarch
Brad Bishop51f694b2018-01-26 22:01:15 -05002inherit update-alternatives
Edward A. Jamesa1cb3232017-11-09 16:03:14 -06003
Patrick Venture37125172018-11-03 14:17:55 -07004LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${PHOSPHORBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"
6
Brad Bishop5f2973f2018-02-26 15:13:42 -05007RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
8
Edward A. Jamesa1cb3232017-11-09 16:03:14 -06009SRC_URI += "file://init"
10
Brad Bishop51f694b2018-01-26 22:01:15 -050011FILES_${PN} += "${base_sbindir}/init"
Edward A. Jamesa1cb3232017-11-09 16:03:14 -060012
13do_install() {
Brad Bishop51f694b2018-01-26 22:01:15 -050014 install -d ${D}/${base_sbindir}
15 install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
Edward A. Jamesa1cb3232017-11-09 16:03:14 -060016}
Brad Bishop51f694b2018-01-26 22:01:15 -050017
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"