blob: 30e0f3613aaf6c7c3a3bae1b301c9d7ecea458ab [file] [log] [blame]
Edward A. Jamesa1cb3232017-11-09 16:03:14 -06001inherit obmc-phosphor-license
Brad Bishop5f2973f2018-02-26 15:13:42 -05002inherit allarch
Brad Bishop51f694b2018-01-26 22:01:15 -05003inherit update-alternatives
Edward A. Jamesa1cb3232017-11-09 16:03:14 -06004
Brad Bishop5f2973f2018-02-26 15:13:42 -05005RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
6
Edward A. Jamesa1cb3232017-11-09 16:03:14 -06007SRC_URI += "file://init"
8
Brad Bishop51f694b2018-01-26 22:01:15 -05009FILES_${PN} += "${base_sbindir}/init"
Edward A. Jamesa1cb3232017-11-09 16:03:14 -060010
11do_install() {
Brad Bishop51f694b2018-01-26 22:01:15 -050012 install -d ${D}/${base_sbindir}
13 install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts
Edward A. Jamesa1cb3232017-11-09 16:03:14 -060014}
Brad Bishop51f694b2018-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"