mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
23 lines
616 B
Bash
23 lines
616 B
Bash
#!/bin/bash
|
|
|
|
build() {
|
|
add_checked_modules -f 'dm-' 'drivers/md/*'
|
|
|
|
# check if a custom mdadm.conf exists
|
|
if grep -qw ^ARRAY "$BASEDIR/etc/mdadm.conf"; then
|
|
echo "Custom /etc/mdadm.conf file will be used in initramfs for assembling arrays."
|
|
add_file "/etc/mdadm.conf"
|
|
fi
|
|
|
|
add_binary "mdadm"
|
|
add_file "/usr/lib/udev/rules.d/64-md-raid.rules"
|
|
}
|
|
|
|
help() {
|
|
cat <<HELPEOF
|
|
This hook loads the necessary modules for a RAID array and uses incremental
|
|
assembly via udev at runtime to create the devices. This hook with NOT work
|
|
without the udev hook included on the image.
|
|
HELPEOF
|
|
}
|