modutils-initscripts.bb 777 B

12345678910111213141516171819202122232425262728293031
  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 = "${WORKDIR}/sources"
  7. UNPACKDIR = "${S}"
  8. INITSCRIPT_NAME = "modutils.sh"
  9. INITSCRIPT_PARAMS = "start 06 S ."
  10. inherit update-rc.d
  11. do_compile () {
  12. }
  13. do_install () {
  14. install -d ${D}${sysconfdir}/init.d/
  15. install -m 0755 ${S}/modutils.sh ${D}${sysconfdir}/init.d/
  16. }
  17. PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
  18. pkg_postinst:${PN} () {
  19. if type systemctl >/dev/null 2>/dev/null; then
  20. if [ -n "$D" ]; then
  21. OPTS="--root=$D"
  22. fi
  23. systemctl $OPTS mask modutils.service
  24. fi
  25. }