mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-09-19 15:38:46 -04:00
Support /dev/disk/by-id/
symlinks in command-line installer (#1422)
* Allow symlinks as target device (for supporting /dev/disk/by-id) * Use correct test (-L) for checking if it is a symlink Co-authored-by: Jakob Lell <jakob@srlabs.com>
This commit is contained in:
parent
c57717aea2
commit
7f717a7fe9
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue