hc
2023-05-26 a23f51ed7a39e452c1037343a84d7db1ca2c5bd7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SUMMARY = "Initscript for auto-loading kernel modules on boot"
SECTION = "base"
LICENSE = "PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=7bf87fc37976e93ec66ad84fac58c098"
SRC_URI = "file://modutils.sh \
      file://PD.patch"
 
PR = "r7"
 
S = "${WORKDIR}"
 
INITSCRIPT_NAME = "modutils.sh"
INITSCRIPT_PARAMS = "start 06 S ."
 
inherit update-rc.d
 
do_compile () {
}
 
do_install () {
   install -d ${D}${sysconfdir}/init.d/
   install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
 
PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
pkg_postinst:${PN} () {
   if type systemctl >/dev/null 2>/dev/null; then
       if [ -n "$D" ]; then
           OPTS="--root=$D"
       fi
       systemctl $OPTS mask modutils.service
   fi
}