X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/1bf3e73373ccf4d515e4b554b5d8e233aaf1e6f3..8dce0adda6e1967de616287e224b914eb1bcef8e:/IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh diff --git a/IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh b/IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh index 77ccfba..a0f88b1 100644 --- a/IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh +++ b/IMG/cpio/ventoy/hook/debian/udev_disk_hook.sh @@ -47,7 +47,13 @@ ventoy_os_install_dmsetup() { if [ $LINTCNT -gt 1 ]; then vtlog "more than one pkgs, need to filter..." VER=$($BUSYBOX_PATH/uname -r) + LINE=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP $VER) + LINTCNT=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -c $VER) + if [ $LINTCNT -gt 1 ]; then + vtlog "Still more than one pkgs, use the first one..." + LINE=$($GREP ' md-modules.*\.udeb' $VTOY_PATH/iso_file_list | $GREP -m1 $VER) + fi fi install_udeb_from_line "$LINE" ${vt_usb_disk} fi