blob: 8f4fdd76bfb44536cf66acf3a052f6b955a4f385 [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
7PR = "r7"
8
9S = "${WORKDIR}"
10
11INITSCRIPT_NAME = "modutils.sh"
Andrew Geissler09209ee2020-12-13 08:44:15 -060012INITSCRIPT_PARAMS = "start 06 S ."
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14inherit update-rc.d
15
16do_compile () {
17}
18
19do_install () {
20 install -d ${D}${sysconfdir}/init.d/
21 install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
22}
23
Patrick Williams213cb262021-08-07 19:21:33 -050024PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
25pkg_postinst:${PN} () {
Andrew Geissler475cb722020-07-10 16:00:51 -050026 if type systemctl >/dev/null 2>/dev/null; then
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027 if [ -n "$D" ]; then
28 OPTS="--root=$D"
29 fi
30 systemctl $OPTS mask modutils.service
31 fi
32}