mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-07-24 18:58:15 +00:00
Fix fdisk detection on BusyBox systems (#3614)
On BusyBox, fdisk -v exists but returns a non-zero exit code, causing the script to incorrectly conclude fdisk is not available. Use POSIX command -v instead to reliably check for fdisk.
This commit is contained in:
committed by
GitHub
parent
ddc8e53156
commit
40895a09f6
@@ -186,7 +186,7 @@ if [ "$MODE" = "install" -a -z "$NONDESTRUCTIVE" ]; then
|
||||
else
|
||||
if parted -v > /dev/null 2>&1; then
|
||||
PARTTOOL='parted'
|
||||
elif fdisk -v >/dev/null 2>&1; then
|
||||
elif command -v fdisk > /dev/null 2>&1; then
|
||||
PARTTOOL='fdisk'
|
||||
else
|
||||
vterr "Both parted and fdisk are not found in the system, Ventoy can't create new partitions."
|
||||
|
||||
Reference in New Issue
Block a user