remove redundant functions
remove unneeded check for lvm/cryptsetup
This commit is contained in:
parent
4909fa6684
commit
e5a23b9708
58
tinyramfs
58
tinyramfs
@ -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"
|
||||
|
||||
install -m644 "${filesdir}/mdev.conf" -t "${workdir}/etc"
|
||||
install -Dm755 "${filesdir}/storage-device" -t "${workdir}/lib/mdev"
|
||||
}
|
||||
install -m644 "${filesdir}/mdev.conf" \
|
||||
"${workdir}/etc/mdev.conf"
|
||||
|
||||
install_mdevd() {
|
||||
install -Dm755 "${filesdir}/storage-device" \
|
||||
"${workdir}/lib/mdev/storage-device"
|
||||
;;
|
||||
mdevd)
|
||||
msg info "installing mdevd"
|
||||
|
||||
install_binary mdevd mdevd-coldplug
|
||||
|
||||
install -m644 "${filesdir}/mdev.conf" -t "${workdir}/etc"
|
||||
install -Dm755 "${filesdir}/storage-device" -t "${workdir}/lib/mdev"
|
||||
}
|
||||
install -m644 "${filesdir}/mdev.conf" \
|
||||
"${workdir}/etc/mdev.conf"
|
||||
|
||||
install_udev() {
|
||||
msg info "installing udev"
|
||||
|
||||
install_binary udevd udevadm dmsetup
|
||||
# FIXME rewrite this piece of crap
|
||||
find /usr/lib/udev -type f | grep -v "rc_keymaps\|hwdb.d" | cpio -pd "$workdir" > /dev/null 2>&1
|
||||
install -Dm755 "${filesdir}/storage-device" \
|
||||
"${workdir}/lib/mdev/storage-device"
|
||||
;;
|
||||
*)
|
||||
msg panic "devmgr option broken"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
install_lvm() {
|
||||
@ -434,16 +451,9 @@ else
|
||||
fi
|
||||
|
||||
generate_depmod
|
||||
|
||||
case "$devmgr" in
|
||||
udev) install_udev ;;
|
||||
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_devmgr
|
||||
[ "$lvm" = 1 ] && install_lvm
|
||||
[ "$luks" = 1 ] && install_luks
|
||||
install_files
|
||||
create_initramfs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user