2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
7 # if we don't have dmraid installed on the host system, no point
8 # in trying to support it in the initramfs.
9 type -P dmraid
>/dev
/null ||
return 1
12 [[ $debug ]] && set -x
15 local dev
=$1 fs
=$2 holder DEVPATH DM_NAME
16 [[ "$fs" = "${fs%%_raid_member}" ]] && return 1
18 DEVPATH
=$
(udevadm info
--query=property
--name=$dev \
20 [[ ${line#DEVPATH} = $line ]] && continue
25 for holder
in /sys
/$DEVPATH/holders
/*; do
26 [[ -e $holder ]] ||
continue
27 DM_NAME
=$
(udevadm info
--query=property
--path=$holder \
29 [[ ${line#DM_NAME} = $line ]] && continue
36 [[ ${DM_NAME} ]] ||
return 1
37 if ! [[ $kernel_only ]]; then
38 echo " rd.dm.uuid=${DM_NAME} " >> "${initdir}/etc/cmdline.d/90dmraid.conf"
43 [[ $hostonly ]] ||
[[ $mount_needs ]] && {
44 for_each_host_dev_fs check_dmraid ||
return 1
57 dracut_install dmraid partx kpartx
59 inst
"$moddir/dmraid.sh" /sbin
/dmraid_scan
61 if [ ! -x /lib
/udev
/vol_id
]; then
62 inst_rules
64-md-raid.rules
65 inst_libdir_file
"libdmraid-events*.so*"
67 inst_rules
"$moddir/61-dmraid-imsm.rules"
68 #inst "$moddir/dmraid-cleanup.sh" /sbin/dmraid-cleanup
69 inst_hook pre-trigger
30 "$moddir/parse-dm.sh"