module-setup.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. # called by dracut
  3. check() {
  4. # a live host-only image doesn't really make a lot of sense
  5. [[ $hostonly ]] && return 1
  6. return 255
  7. }
  8. # called by dracut
  9. depends() {
  10. # if dmsetup is not installed, then we cannot support fedora/red hat
  11. # style live images
  12. echo dm rootfs-block img-lib
  13. return 0
  14. }
  15. # called by dracut
  16. installkernel() {
  17. instmods squashfs loop iso9660
  18. }
  19. # called by dracut
  20. install() {
  21. inst_multiple umount dmsetup blkid dd losetup grep blockdev find
  22. inst_multiple -o checkisomd5
  23. inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"
  24. inst_hook cmdline 31 "$moddir/parse-iso-scan.sh"
  25. inst_hook pre-udev 30 "$moddir/dmsquash-live-genrules.sh"
  26. inst_hook pre-udev 30 "$moddir/dmsquash-liveiso-genrules.sh"
  27. inst_hook pre-pivot 20 "$moddir/apply-live-updates.sh"
  28. inst_script "$moddir/dmsquash-live-root.sh" "/sbin/dmsquash-live-root"
  29. inst_script "$moddir/iso-scan.sh" "/sbin/iso-scan"
  30. inst_script "$moddir/dmsquash-generator.sh" $systemdutildir/system-generators/dracut-dmsquash-generator
  31. inst_hook pre-pivot 10 "$moddir/ayarlar.sh"
  32. # should probably just be generally included
  33. inst_rules 60-cdrom_id.rules
  34. inst_simple "$moddir/checkisomd5@.service" "/etc/systemd/system/checkisomd5@.service"
  35. dracut_need_initqueue
  36. }