modutils-initscripts.bb 752 B

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