]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Merge branch 'master' of https://github.com/ventoy/Ventoy
authorlongpanda <admin@ventoy.net>
Sun, 13 Feb 2022 09:01:10 +0000 (17:01 +0800)
committerlongpanda <admin@ventoy.net>
Sun, 13 Feb 2022 09:01:10 +0000 (17:01 +0800)
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