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