]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - INSTALL/tool/VentoyWorker.sh
Update languages.json (#1435)
[Ventoy.git] / INSTALL / tool / VentoyWorker.sh
index 9754e5ed5c01b9716b784425a854b1613d86a25f..cdb1dbb87f4f79c1033eac96e27ed2773c7f1717 100644 (file)
@@ -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