simpify modker var

This commit is contained in:
illiliti 2020-02-27 14:54:30 +03:00
parent 1426c4196a
commit a08c405a54

View File

@ -83,6 +83,7 @@ parse_conf() {
filesdir="${_filesdir:-./files}" filesdir="${_filesdir:-./files}"
debug="${_debug:-${debug:-0}}" debug="${_debug:-${debug:-0}}"
initramfs="${_initramfs:-${initramfs:-./initramfs-${kernel}}}" initramfs="${_initramfs:-${initramfs:-./initramfs-${kernel}}}"
modker="${moddir}/${kernel}"
} }
create_workdir() { create_workdir() {
@ -306,20 +307,18 @@ install_hostonly_drivers() {
install_all_drivers() { install_all_drivers() {
msg info "installing all drivers" msg info "installing all drivers"
modker="${moddir}/${kernel}/kernel"
find \ find \
"${modker}/arch" \ "${modker}/kernel/arch" \
"${modker}/crypto" \ "${modker}/kernel/crypto" \
"${modker}/fs" \ "${modker}/kernel/fs" \
"${modker}/lib" \ "${modker}/kernel/lib" \
"${modker}/drivers/block" \ "${modker}/kernel/drivers/block" \
"${modker}/drivers/ata" \ "${modker}/kernel/drivers/ata" \
"${modker}/drivers/md" \ "${modker}/kernel/drivers/md" \
"${modker}/drivers/scsi" \ "${modker}/kernel/drivers/scsi" \
"${modker}/drivers/usb/storage" \ "${modker}/kernel/drivers/usb/storage" \
"${modker}/drivers/usb/host" \ "${modker}/kernel/drivers/usb/host" \
"${modker}/drivers/virtio" \ "${modker}/kernel/drivers/virtio" \
-type f 2> /dev/null | -type f 2> /dev/null |
while read -r path_driver; do while read -r path_driver; do
@ -330,8 +329,6 @@ install_all_drivers() {
generate_depmod() { generate_depmod() {
msg info "running depmod" msg info "running depmod"
modker="${moddir}/${kernel}"
cp "${modker}/modules.builtin" \ cp "${modker}/modules.builtin" \
"${modker}/modules.order" \ "${modker}/modules.order" \
"${workdir}${modker}" "${workdir}${modker}"