diff options
author | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:36:10 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-08-07 17:36:10 (GMT) |
commit | 9bf6461124e215b2cbff57dd0f514dac5dfc0174 (patch) | |
tree | 214ec9084a8122b167d316c49f34072d25c3a008 /abs/core/mdadm/mdadm_install | |
parent | d959d709bde5168e9d8bbfba7affd622ced1e6b4 (diff) | |
download | linhes_pkgbuild-9bf6461124e215b2cbff57dd0f514dac5dfc0174.zip linhes_pkgbuild-9bf6461124e215b2cbff57dd0f514dac5dfc0174.tar.gz linhes_pkgbuild-9bf6461124e215b2cbff57dd0f514dac5dfc0174.tar.bz2 |
mdadm 3.2.5
Diffstat (limited to 'abs/core/mdadm/mdadm_install')
-rw-r--r-- | abs/core/mdadm/mdadm_install | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/abs/core/mdadm/mdadm_install b/abs/core/mdadm/mdadm_install index b7a57ea..cf6159e 100644 --- a/abs/core/mdadm/mdadm_install +++ b/abs/core/mdadm/mdadm_install @@ -1,46 +1,45 @@ -# vim: set ft=sh: - -install () -{ - MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") " - BINARIES="" - FILES="" - SCRIPT="mdadm" +#!/bin/bash + +build() { + add_checked_modules -f 'dm-' 'drivers/md/*' + # check if a custom mdadm.conf exists if grep -q ^ARRAY /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 "/sbin/mdassemble" - add_file "/lib/udev/rules.d/64-md-raid.rules" + + add_runscript } -help () -{ -cat<<HELPEOF - This hook loads the necessary modules for any raid root device, - and assembles the raid device when run. - - If arrays are defined in /etc/mdadm.conf, the file will be used instead - of command line assembling. - - Command Line Setup: - - for raid arrays with persistent superblocks: - md=<md device no.>,dev0,dev1,...,devn - md=<md device no.>,uuid - - for partitionable raid arrays with persistent superblocks: - md=d<md device no.>,dev0,dev1,...,devn - md=d<md device no.>,uuid - - Parameters: - - <md device no.> = the number of the md device: - 0 means md0, 1 means md1, ... - - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1 - or 0900878d:f95f6057:c39a36e9:55efa60a - Examples: - - md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1 - This will setup 2 md partitionable arrays. - - md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1 - This will setup 2 md arrays with persistent superblocks. +help() { + cat <<HELPEOF +This hook loads the necessary modules for any raid root device, +and assembles the raid device when run. + +If arrays are defined in /etc/mdadm.conf, the file will be used instead +of command line assembling. + +Command Line Setup: +- for raid arrays with persistent superblocks: + md=<md device no.>,dev0,dev1,...,devn + md=<md device no.>,uuid +- for partitionable raid arrays with persistent superblocks: + md=d<md device no.>,dev0,dev1,...,devn + md=d<md device no.>,uuid + +Parameters: +- <md device no.> = the number of the md device: + 0 means md0, 1 means md1, ... +- <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1 + or 0900878d:f95f6057:c39a36e9:55efa60a +Examples: +- md=d0,/dev/sda3,/dev/sda4 md=d1,/dev/hda1,/dev/hdb1 + This will setup 2 md partitionable arrays. +- md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1 + This will setup 2 md arrays with persistent superblocks. HELPEOF } + +# vim: set ft=sh ts=4 sw=4 et: |