mdadm_udev_install 727 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. build() {
  3. add_checked_modules -f 'dm-' 'drivers/md/*'
  4. # check if a custom mdadm.conf exists
  5. if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
  6. echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
  7. add_file "/etc/mdadm.conf"
  8. fi
  9. add_binary "/usr/bin/mdadm"
  10. add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
  11. add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.rules"
  12. }
  13. help() {
  14. cat <<HELPEOF
  15. This hook loads the necessary modules for a RAID array and uses incremental
  16. assembly via udev at runtime to create the devices. This hook will NOT work
  17. without the udev hook included on the image.
  18. HELPEOF
  19. }
  20. # vim: set ft=sh ts=4 sw=4 et: