Edward A. James | a1cb323 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 1 | inherit obmc-phosphor-license |
Brad Bishop | 5f2973f | 2018-02-26 15:13:42 -0500 | [diff] [blame] | 2 | inherit allarch |
Brad Bishop | 51f694b | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 3 | inherit update-alternatives |
Edward A. James | a1cb323 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 4 | |
Brad Bishop | 5f2973f | 2018-02-26 15:13:42 -0500 | [diff] [blame] | 5 | RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}" |
| 6 | |
Edward A. James | a1cb323 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 7 | SRC_URI += "file://init" |
| 8 | |
Brad Bishop | 51f694b | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 9 | FILES_${PN} += "${base_sbindir}/init" |
Edward A. James | a1cb323 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 10 | |
| 11 | do_install() { |
Brad Bishop | 51f694b | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 12 | install -d ${D}/${base_sbindir} |
| 13 | install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts |
Edward A. James | a1cb323 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 14 | } |
Brad Bishop | 51f694b | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 15 | |
| 16 | ALTERNATIVE_${PN} = "init" |
| 17 | ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts" |
| 18 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
| 19 | |
| 20 | # Use a number higher than the systemd init alternative so that |
| 21 | # ours is enabled instead. |
| 22 | ALTERNATIVE_PRIORITY[init] ?= "400" |