X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/b9b6852631a3a502c7a2857468d1096098a53a13..fa7e1d5fa0007e5d1d634cc4e41fdfd3aa381a8e:/INSTALL/tool/VentoyWorker.sh diff --git a/INSTALL/tool/VentoyWorker.sh b/INSTALL/tool/VentoyWorker.sh index 9754e5e..cdb1dbb 100644 --- a/INSTALL/tool/VentoyWorker.sh +++ b/INSTALL/tool/VentoyWorker.sh @@ -60,6 +60,12 @@ while [ -n "$1" ]; do exit 1 fi DISK=$1 + # Resolve symlinks now, will be needed to look up information about the device in + # the /sys/ filesystem, for example /sys/class/block/${DISK#/dev/}/start + # The main use case is supporting /dev/disk/by-id/ symlinks instead of raw devices + if [ -L "$DISK" ]; then + DISK=$(readlink -e -n "$DISK") + fi fi shift