mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'change to mdadm hook on raid setups'
This commit is contained in:
parent
d33615fe84
commit
20ed223aa3
1 changed files with 3 additions and 2 deletions
|
@ -1982,13 +1982,14 @@ auto_hwdetect()
|
||||||
if [ "$(cat /proc/modules | grep nfs)" ]; then
|
if [ "$(cat /proc/modules | grep nfs)" ]; then
|
||||||
DIALOG --defaultno --yesno "Setup detected nfs driver...\nDo you need support for booting from nfs shares?" 0 0 && HWPARAMETER="$HWPARAMETER --nfs"
|
DIALOG --defaultno --yesno "Setup detected nfs driver...\nDo you need support for booting from nfs shares?" 0 0 && HWPARAMETER="$HWPARAMETER --nfs"
|
||||||
fi
|
fi
|
||||||
[ "$(cat /proc/mdstat | grep ^md[0-9])" ] && HWPARAMETER="$HWPARAMETER --raid"
|
|
||||||
[ "$(cat /proc/mdstat | grep ^md_d[0-9])" ] && HWPARAMETER="$HWPARAMETER --raid-partitions"
|
|
||||||
if [ -e $DESTDIR/lib/initcpio/hooks/dmraid ]; then
|
if [ -e $DESTDIR/lib/initcpio/hooks/dmraid ]; then
|
||||||
for i in $(dmraid -l | sed -e 's/ .*//g'); do
|
for i in $(dmraid -l | sed -e 's/ .*//g'); do
|
||||||
ls /dev/mapper/$i > /dev/null 2>&1 && HWPARAMETER="$HWPARAMETER --dmraid"
|
ls /dev/mapper/$i > /dev/null 2>&1 && HWPARAMETER="$HWPARAMETER --dmraid"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
if [ -e $DESTDIR/lib/initcpio/hooks/mdadm ]; then
|
||||||
|
[ "$(cat /proc/mdstat | grep ^md[0-9])" -o "$(cat /proc/mdstat | grep ^md_d[0-9])" ] && HWPARAMETER="$HWPARAMETER --mdadm"
|
||||||
|
fi
|
||||||
[ "$(blkid -c /dev/null | grep TYPE=\"lvm2pv\")" ] && HWPARAMETER="$HWPARAMETER --lvm2"
|
[ "$(blkid -c /dev/null | grep TYPE=\"lvm2pv\")" ] && HWPARAMETER="$HWPARAMETER --lvm2"
|
||||||
[ "$(blkid -c /dev/null | grep TYPE=\"crypt_LUKS\")" ] && HWPARAMETER="$HWPARAMETER --encrypt"
|
[ "$(blkid -c /dev/null | grep TYPE=\"crypt_LUKS\")" ] && HWPARAMETER="$HWPARAMETER --encrypt"
|
||||||
HWDETECTHOSTCONTROLLER="$(hwdetect --filesystem --hostcontroller $HWPARAMETER)"
|
HWDETECTHOSTCONTROLLER="$(hwdetect --filesystem --hostcontroller $HWPARAMETER)"
|
||||||
|
|
Loading…
Reference in a new issue