summaryrefslogtreecommitdiff
path: root/libre-testing/mdadm/mdadm_udev_install
diff options
context:
space:
mode:
authorBruno Cichon <ebrasca@librepanther.com>2018-10-01 01:51:03 +0200
committerBruno Cichon <ebrasca@librepanther.com>2018-10-01 01:51:03 +0200
commit56f955aca6231693fe797de4793f77ed58ab116e (patch)
tree17daeabce98174f288bab94b47961dc9e9931e66 /libre-testing/mdadm/mdadm_udev_install
parent75ff40baa049bae7e9270d20ef86a88b733006ab (diff)
Add some base packages for ppc64le
Diffstat (limited to 'libre-testing/mdadm/mdadm_udev_install')
-rw-r--r--libre-testing/mdadm/mdadm_udev_install25
1 files changed, 25 insertions, 0 deletions
diff --git a/libre-testing/mdadm/mdadm_udev_install b/libre-testing/mdadm/mdadm_udev_install
new file mode 100644
index 000000000..c01cbaf24
--- /dev/null
+++ b/libre-testing/mdadm/mdadm_udev_install
@@ -0,0 +1,25 @@
+#!/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 "/usr/bin/mdadm"
+ add_file "/usr/lib/udev/rules.d/63-md-raid-arrays.rules"
+ add_file "/usr/lib/udev/rules.d/64-md-raid-assembly.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 will NOT work
+without the udev hook included on the image.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et: