Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support /dev/disk/by-id/ symlinks in command-line installer #1422

Merged
merged 2 commits into from
Feb 6, 2022

Conversation

jakoblell
Copy link
Contributor

Currently the command-line installer fails when giving the target device as a /dev/disk/by-id symlink (since it tries to access more information about the device in the /sys/ filesystem, for example /sys/class/block/${DISK#/dev/}/start). Many Linux users (including myself) prefer using these /dev/disk/by-id symlinks instead of raw device names (especially for dangerous operations such as formatting a device) since this reduces the probability of accidentally using an incorrect device.

This PR will resolve the symlink in the beginning of VentoyWorker.sh (directly when parsing the command-line arguments).

@ventoy
Copy link
Owner

ventoy commented Feb 6, 2022

DISK has been checked for -b above, so I think -L is better.

if [ -L "$DISK" ]; then
    DISK=$(readlink -e -n "$DISK")
fi

@jakoblell
Copy link
Contributor Author

Thanks for the info, somehow used the incorrect test. Should be fixed now.

@ventoy ventoy merged commit 7f717a7 into ventoy:master Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants