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