remove redundant functions
remove unneeded check for lvm/cryptsetup
This commit is contained in:
parent
4909fa6684
commit
e5a23b9708
62
tinyramfs
62
tinyramfs
@ -139,28 +139,45 @@ create_symlinks() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
install_mdev() {
|
install_devmgr() {
|
||||||
msg info "installing mdev"
|
case "$devmgr" in
|
||||||
|
udev)
|
||||||
|
msg info "installing udev"
|
||||||
|
|
||||||
install -m644 "${filesdir}/mdev.conf" -t "${workdir}/etc"
|
install_binary udevd udevadm dmsetup
|
||||||
install -Dm755 "${filesdir}/storage-device" -t "${workdir}/lib/mdev"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_mdevd() {
|
find /usr/lib/udev \
|
||||||
msg info "installing mdevd"
|
! -path "*rc_keymaps*" \
|
||||||
|
! -path "*hwdb.d*" \
|
||||||
|
-type f |
|
||||||
|
|
||||||
install_binary mdevd mdevd-coldplug
|
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 -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"
|
||||||
|
;;
|
||||||
|
mdevd)
|
||||||
|
msg info "installing mdevd"
|
||||||
|
|
||||||
install_binary udevd udevadm dmsetup
|
install_binary mdevd mdevd-coldplug
|
||||||
# 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 -m644 "${filesdir}/mdev.conf" \
|
||||||
|
"${workdir}/etc/mdev.conf"
|
||||||
|
|
||||||
|
install -Dm755 "${filesdir}/storage-device" \
|
||||||
|
"${workdir}/lib/mdev/storage-device"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
msg panic "devmgr option broken"
|
||||||
|
;;
|
||||||
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user