From 20b07dd1b380151270431665f6088926e075d3d7 Mon Sep 17 00:00:00 2001 From: alex-nitrokey Date: Thu, 25 Jun 2020 09:46:11 +0200 Subject: [PATCH] swap label and device and minor formatting change --- initrd/bin/mount-usb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/initrd/bin/mount-usb b/initrd/bin/mount-usb index de9eb9d2..1e20f24a 100755 --- a/initrd/bin/mount-usb +++ b/initrd/bin/mount-usb @@ -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 $i $(blkid | grep $i | grep -o 'LABEL=".*"' | sed 's/\ UUID.*$//') >> /tmp/usb_disk_list + echo $(blkid | grep $i | grep -o 'LABEL=".*"' | cut -f2 -d '"') $i >> /tmp/usb_disk_list else for j in $(ls $i* | tail -${USB_NUM_PARTITIONS}); do - echo $j $(blkid | grep $j | grep -o 'LABEL=".*"' | sed 's/\ UUID.*$//') >> /tmp/usb_disk_list + echo $(blkid | grep $j | grep -o 'LABEL=".*"' | cut -f2 -d '"') $j >> /tmp/usb_disk_list done fi done