modutils-initscripts.bb 762 B

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