remove redundant functions

remove unneeded check for lvm/cryptsetup
This commit is contained in:
illiliti 2020-02-24 22:54:07 +03:00
parent 4909fa6684
commit e5a23b9708

View File

@ -139,28 +139,45 @@ create_symlinks() {
) )
} }
install_mdev() { install_devmgr() {
case "$devmgr" in
udev)
msg info "installing udev"
install_binary udevd udevadm dmsetup
find /usr/lib/udev \
! -path "*rc_keymaps*" \
! -path "*hwdb.d*" \
-type f |
cpio -pd "$workdir" > /dev/null 2>&1 ||
msg panic "failed to install udev"
;;
mdev)
msg info "installing mdev" msg info "installing mdev"
install -m644 "${filesdir}/mdev.conf" -t "${workdir}/etc" install -m644 "${filesdir}/mdev.conf" \
install -Dm755 "${filesdir}/storage-device" -t "${workdir}/lib/mdev" "${workdir}/etc/mdev.conf"
}
install_mdevd() { install -Dm755 "${filesdir}/storage-device" \
"${workdir}/lib/mdev/storage-device"
;;
mdevd)
msg info "installing mdevd" msg info "installing mdevd"
install_binary mdevd mdevd-coldplug install_binary mdevd mdevd-coldplug
install -m644 "${filesdir}/mdev.conf" -t "${workdir}/etc" install -m644 "${filesdir}/mdev.conf" \
install -Dm755 "${filesdir}/storage-device" -t "${workdir}/lib/mdev" "${workdir}/etc/mdev.conf"
}
install_udev() { install -Dm755 "${filesdir}/storage-device" \
msg info "installing udev" "${workdir}/lib/mdev/storage-device"
;;
install_binary udevd udevadm dmsetup *)
# FIXME rewrite this piece of crap msg panic "devmgr option broken"
find /usr/lib/udev -type f | grep -v "rc_keymaps\|hwdb.d" | cpio -pd "$workdir" > /dev/null 2>&1 ;;
esac
} }
install_lvm() { install_lvm() {
@ -434,16 +451,9 @@ else
fi fi
generate_depmod generate_depmod
install_devmgr
case "$devmgr" in [ "$lvm" = 1 ] && install_lvm
udev) install_udev ;; [ "$luks" = 1 ] && install_luks
mdev) install_mdev ;;
mdevd) install_mdevd ;;
*) msg panic "devmgr option broken" ;;
esac
[ "$lvm" = 1 ] && command -v lvm 2>&1 > /dev/null && install_lvm
[ "$luks" = 1 ] && command -v cryptsetup 2>&1 > /dev/null && install_luks
install_files install_files
create_initramfs create_initramfs