blob: 30e0f3613aaf6c7c3a3bae1b301c9d7ecea458ab [file] [log] [blame]
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06001inherit obmc-phosphor-license
Brad Bishop3eda7092018-02-26 15:13:42 -05002inherit allarch
Brad Bishop5a3f4f12018-01-26 22:01:15 -05003inherit update-alternatives
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06004
Brad Bishop3eda7092018-02-26 15:13:42 -05005RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
6
Edward A. Jamesc03b9c42017-11-09 16:03:14 -06007SRC_URI += "file://init"
8
Brad Bishop5a3f4f12018-01-26 22:01:15 -05009FILES_${PN} += "${base_sbindir}/init"
Edward A. Jamesc03b9c42017-11-09 16:03:14 -060010
11do_install() {
Brad Bishop5a3f4f12018-01-26 22:01:15 -050012 install -d ${D}/${base_sbindir}
13 install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
Edward A. Jamesc03b9c42017-11-09 16:03:14 -060014}
Brad Bishop5a3f4f12018-01-26 22:01:15 -050015
16ALTERNATIVE_${PN} = "init"
17ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts"
18ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
19
20# Use a number higher than the systemd init alternative so that
21# ours is enabled instead.
22ALTERNATIVE_PRIORITY[init] ?= "400"