From ec860d69c80f5c0a2d68da45f7ef55aaf714b3b5 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 11 May 2019 21:40:33 +0200 Subject: iso2usb.sh: fix the "refresh" case --- iso2usb.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'iso2usb.sh') diff --git a/iso2usb.sh b/iso2usb.sh index d006d6c..e8c7014 100644 --- a/iso2usb.sh +++ b/iso2usb.sh @@ -653,7 +653,11 @@ if [ $REFRESH -eq 0 ]; then FEAT_64BIT="-O ^64bit" fi tune2fs -c 0 -i 0 -m 0 ${FEAT_64BIT} ${TARGETP3} - +else + # Determine partition names independently of storage architecture: + TARGETP1=$(fdisk -l $TARGET |grep ^$TARGET |cut -d' ' -f1 |grep -E '[^0-9]1$') + TARGETP2=$(fdisk -l $TARGET |grep ^$TARGET |cut -d' ' -f1 |grep -E '[^0-9]2$') + TARGETP3=$(fdisk -l $TARGET |grep ^$TARGET |cut -d' ' -f1 |grep -E '[^0-9]3$') fi # End [ $REFRESH -eq 0 ] # Create temporary mount points for the ISO file and USB device: -- cgit v1.2.3