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