Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Initscript for auto-loading kernel modules on boot" |
| 2 | SECTION = "base" |
| 3 | LICENSE = "PD" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098" |
| 5 | SRC_URI = "file://modutils.sh \ |
| 6 | file://PD.patch" |
| 7 | |
| 8 | PR = "r7" |
| 9 | |
| 10 | S = "${WORKDIR}" |
| 11 | |
| 12 | INITSCRIPT_NAME = "modutils.sh" |
Andrew Geissler | 09209ee | 2020-12-13 08:44:15 -0600 | [diff] [blame] | 13 | INITSCRIPT_PARAMS = "start 06 S ." |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | |
| 15 | inherit update-rc.d |
| 16 | |
| 17 | do_compile () { |
| 18 | } |
| 19 | |
| 20 | do_install () { |
| 21 | install -d ${D}${sysconfdir}/init.d/ |
| 22 | install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/ |
| 23 | } |
| 24 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}" |
| 26 | pkg_postinst:${PN} () { |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 27 | if type systemctl >/dev/null 2>/dev/null; then |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | if [ -n "$D" ]; then |
| 29 | OPTS="--root=$D" |
| 30 | fi |
| 31 | systemctl $OPTS mask modutils.service |
| 32 | fi |
| 33 | } |