blob: b630a402ff5729810ec7a4ebcd5bb7f712713cb1 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Initscript for auto-loading kernel modules on boot"
2SECTION = "base"
Patrick Williams45852732022-04-02 08:58:32 -05003LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://modutils.sh;beginline=3;endline=3;md5=b2dccaa94b3629a08bfb4f983cad6f89"
5SRC_URI = "file://modutils.sh"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007
8S = "${WORKDIR}"
9
10INITSCRIPT_NAME = "modutils.sh"
Andrew Geissler09209ee2020-12-13 08:44:15 -060011INITSCRIPT_PARAMS = "start 06 S ."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
13inherit update-rc.d
14
15do_compile () {
16}
17
18do_install () {
19 install -d ${D}${sysconfdir}/init.d/
20 install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
21}
22
Patrick Williams213cb262021-08-07 19:21:33 -050023PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
24pkg_postinst:${PN} () {
Andrew Geissler475cb722020-07-10 16:00:51 -050025 if type systemctl >/dev/null 2>/dev/null; then
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 if [ -n "$D" ]; then
27 OPTS="--root=$D"
28 fi
29 systemctl $OPTS mask modutils.service
30 fi
31}