Commit c537f664 authored by Matti Hyttinen's avatar Matti Hyttinen

Merge branch 'fix-multiple-lvm2-modules' into 'master'

Avoid duplicate modules being added to HOOKS in mkinitcpio.conf

Closes #255

See merge request !253
parents 7305a590 58fdc0cb
......@@ -320,13 +320,13 @@ install_base() {
for (( i=${#lsblk_lines[@]}-1 ; i>=0 ; i-- )) ; do
if [[ $(echo ${lsblk_lines[i]} | grep "^lvm" | wc -l) > 0 ]]; then
sed -i 's/\<block\>/& lvm2/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/lvm2/b; s/\<block\>/& lvm2/' ${MOUNTPOINT}/etc/mkinitcpio.conf
continue
fi
if [[ $(echo ${lsblk_lines[i]} | grep "^crypt" | wc -l) > 0 ]]; then
sed -i 's/\<block\>/& encrypt/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i 's/\<autodetect\>/& keymap/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i 's/\<autodetect\>/& keyboard/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/encrypt/b; s/\<block\>/& encrypt/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/keymap/b; s/\<autodetect\>/& keymap/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/keyboard/b; s/\<autodetect\>/& keyboard/' ${MOUNTPOINT}/etc/mkinitcpio.conf
continue
fi
if [[ $(echo ${lsblk_lines[i]} | grep "^raid" | wc -l) > 0 ]]; then
......
......@@ -387,13 +387,13 @@ install_desktop() {
for (( i=${#lsblk_lines[@]}-1 ; i>=0 ; i-- )) ; do
if [[ $(echo ${lsblk_lines[i]} | grep "^lvm" | wc -l) > 0 ]]; then
sed -i 's/\<block\>/& lvm2/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/lvm2/b; s/\<block\>/& lvm2/' ${MOUNTPOINT}/etc/mkinitcpio.conf
continue
fi
if [[ $(echo ${lsblk_lines[i]} | grep "^crypt" | wc -l) > 0 ]]; then
sed -i 's/\<block\>/& encrypt/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i 's/\<autodetect\>/& keymap/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i 's/\<autodetect\>/& keyboard/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/encrypt/b; s/\<block\>/& encrypt/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/keymap/b; s/\<autodetect\>/& keymap/' ${MOUNTPOINT}/etc/mkinitcpio.conf
sed -i '/keyboard/b; s/\<autodetect\>/& keyboard/' ${MOUNTPOINT}/etc/mkinitcpio.conf
continue
fi
if [[ $(echo ${lsblk_lines[i]} | grep "^raid" | wc -l) > 0 ]]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment