Brad Bishop | 3eda709 | 2018-02-26 15:13:42 -0500 | [diff] [blame] | 1 | inherit allarch |
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 | |
Brad Bishop | 75f0387 | 2018-11-03 09:41:57 -0700 | [diff] [blame] | 4 | LICENSE = "Apache-2.0" |
Brad Bishop | 6f3f0aa | 2019-09-13 12:14:05 -0400 | [diff] [blame] | 5 | 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] | 6 | |
Brad Bishop | 3eda709 | 2018-02-26 15:13:42 -0500 | [diff] [blame] | 7 | RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}" |
| 8 | |
Edward A. James | c03b9c4 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 9 | SRC_URI += "file://init" |
| 10 | |
Brad Bishop | 5a3f4f1 | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 11 | FILES_${PN} += "${base_sbindir}/init" |
Edward A. James | c03b9c4 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 12 | |
| 13 | do_install() { |
Brad Bishop | 5a3f4f1 | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 14 | install -d ${D}/${base_sbindir} |
| 15 | install -m 0755 ${WORKDIR}/init ${D}/${base_sbindir}/preinit-mounts |
Edward A. James | c03b9c4 | 2017-11-09 16:03:14 -0600 | [diff] [blame] | 16 | } |
Brad Bishop | 5a3f4f1 | 2018-01-26 22:01:15 -0500 | [diff] [blame] | 17 | |
| 18 | ALTERNATIVE_${PN} = "init" |
| 19 | ALTERNATIVE_TARGET[init] = "${base_sbindir}/preinit-mounts" |
| 20 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" |
| 21 | |
| 22 | # Use a number higher than the systemd init alternative so that |
| 23 | # ours is enabled instead. |
| 24 | ALTERNATIVE_PRIORITY[init] ?= "400" |