Fixed support for loop devices

This commit is contained in:
Logan G 2024-09-25 16:08:09 -06:00
parent 877ade171b
commit 168ef3cbf7
Signed by: logan
GPG key ID: E328528C921E7A7A

View file

@ -170,7 +170,7 @@ if [[ -z $TARGET ]]; then
fi
TARGET_TYPE=$(lsblk -ndo TYPE "${TARGET}")
if [[ "$TARGET_TYPE" == "disk" && -z "$(blkid -o value -s TYPE "${TARGET}")" ]]; then
if [[ ( "$TARGET_TYPE" == "disk" || "$TARGET_TYPE" == "loop" ) && -z "$(blkid -o value -s TYPE "${TARGET}")" ]]; then
lsblk --list --paths --noheadings --output NAME,TYPE "${TARGET}" | while read name type; do
[[ "$type" = "part" ]] && TARGET="$name" "$0" $@
done