Brad Bishop | 75f0387 | 2018-11-03 09:41:57 -0700 | [diff] [blame] | 1 | LICENSE = "Apache-2.0" |
Brad Bishop | 6f3f0aa | 2019-09-13 12:14:05 -0400 | [diff] [blame] | 2 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" |
Brad Bishop | 75f0387 | 2018-11-03 09:41:57 -0700 | [diff] [blame] | 3 | |
Edward A. James | c03b9c4 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 4 | SRC_URI += "file://init" |
| 5 | |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 6 | inherit allarch |
| 7 | inherit update-alternatives |
| 8 | |
| 9 | do_install() { |
| 10 | install -d ${D}/${base_sbindir} |
| 11 | install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts |
| 12 | } |
| 13 | |
| 14 | RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}" |
| 15 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 16 | FILES:${PN} += "${base_sbindir}/init" |
Edward A. James | c03b9c4 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 17 | |
Brad Bishop | 5a3f4f1 | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 18 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
Brad Bishop | 5a3f4f1 | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 19 | # Use a number higher than the systemd init alternative so that |
| 20 | # ours is enabled instead. |
| 21 | ALTERNATIVE_PRIORITY[init] ?= "400" |
Ed Tanous | 9936f86 | 2022-09-19 09:13:20 -0700 | [diff] [blame] | 22 | |
| 23 | ALTERNATIVE:${PN} = "init" |
| 24 | ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts" |