blob: 282f8631b1e932d8089f14746ffde23f76ac4c42 [file] [log] [blame]
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06001inherit obmc-phosphor-license
Brad Bishop5a3f4f12018-01-26 22:01:15 -05002inherit update-alternatives
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06003
4SRC_URI += "file://init"
5
Brad Bishop5a3f4f12018-01-26 22:01:15 -05006FILES_${PN} += "${base_sbindir}/init"
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06007
8do_install() {
Brad Bishop5a3f4f12018-01-26 22:01:15 -05009 install -d ${D}/${base_sbindir}
10 install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
Edward A. Jamesc03b9c42017-11-09 16:03:14 -060011}
Brad Bishop5a3f4f12018-01-26 22:01:15 -050012
13ALTERNATIVE_${PN} = "init"
14ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"
15ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
16
17# Use a number higher than the systemd init alternative so that
18# ours is enabled instead.
19ALTERNATIVE_PRIORITY[init] ?= "400"