mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
dd partition Label to menu list
This commit is contained in:
parent
05c854753c
commit
6d29ab71f9
@ -55,9 +55,11 @@ if [ -z ${USB_MOUNT_DEVICE} ]; then
|
|||||||
# remove block device from list if numeric partitions exist, since not bootable
|
# remove block device from list if numeric partitions exist, since not bootable
|
||||||
let USB_NUM_PARTITIONS=`ls -1 $i* | wc -l`-1
|
let USB_NUM_PARTITIONS=`ls -1 $i* | wc -l`-1
|
||||||
if [ ${USB_NUM_PARTITIONS} -eq 0 ]; then
|
if [ ${USB_NUM_PARTITIONS} -eq 0 ]; then
|
||||||
echo $i >> /tmp/usb_disk_list
|
echo $i $(blkid | grep $i | grep -o 'LABEL=".*"' | sed 's/\ UUID.*$//') >> /tmp/usb_disk_list
|
||||||
else
|
else
|
||||||
ls $i* | tail -${USB_NUM_PARTITIONS} >> /tmp/usb_disk_list
|
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
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -95,7 +97,7 @@ if [ -z ${USB_MOUNT_DEVICE} ]; then
|
|||||||
if [ "$option_index" = "a" ]; then
|
if [ "$option_index" = "a" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
USB_MOUNT_DEVICE=`head -n $option_index /tmp/usb_disk_list | tail -1`
|
USB_MOUNT_DEVICE=`head -n $option_index /tmp/usb_disk_list | tail -1 | sed 's/\ .*$//'`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "rw" ]; then
|
if [ "$1" = "rw" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user