mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 10:46:44 +00:00
Re-arrange the order of label and device
This commit is contained in:
parent
20b07dd1b3
commit
84b2f9b540
@ -55,10 +55,10 @@ if [ -z ${USB_MOUNT_DEVICE} ]; then
|
||||
# remove block device from list if numeric partitions exist, since not bootable
|
||||
let USB_NUM_PARTITIONS=`ls -1 $i* | wc -l`-1
|
||||
if [ ${USB_NUM_PARTITIONS} -eq 0 ]; then
|
||||
echo $(blkid | grep $i | grep -o 'LABEL=".*"' | cut -f2 -d '"') $i >> /tmp/usb_disk_list
|
||||
echo $i $(blkid | grep $i | grep -o 'LABEL=".*"' | cut -f2 -d '"') >> /tmp/usb_disk_list
|
||||
else
|
||||
for j in $(ls $i* | tail -${USB_NUM_PARTITIONS}); do
|
||||
echo $(blkid | grep $j | grep -o 'LABEL=".*"' | cut -f2 -d '"') $j >> /tmp/usb_disk_list
|
||||
echo $j $(blkid | grep $j | grep -o 'LABEL=".*"' | cut -f2 -d '"') >> /tmp/usb_disk_list
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user