mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 02:39:59 +00:00
etc/functions, gpg-gui: Filter boot device options with '/dev/'
Grepping on just 'Disk' can lead to disk UUID identifier strings being added to /tmp/disklist, which then fail to parse later on. Avoid this by grepping on 'Disk /dev' instead. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
1c6f623c25
commit
de0ce98da3
@ -31,7 +31,7 @@ while true; do
|
||||
;;
|
||||
"b" )
|
||||
CURRENT_OPTION=`grep 'CONFIG_BOOT_DEV=' /tmp/config | tail -n1 | cut -f2 -d '=' | tr -d '"'`
|
||||
if ! fdisk -l | grep "Disk" | cut -f2 -d " " | cut -f1 -d ":" > /tmp/disklist.txt ; then
|
||||
if ! fdisk -l | grep "Disk /dev/" | cut -f2 -d " " | cut -f1 -d ":" > /tmp/disklist.txt ; then
|
||||
whiptail $BG_COLOR_ERROR --title 'ERROR: No bootable devices found' \
|
||||
--msgbox " $ERROR\n\n" 16 60
|
||||
exit 1
|
||||
|
@ -315,7 +315,7 @@ detect_boot_device()
|
||||
fi
|
||||
|
||||
# generate list of possible boot devices
|
||||
fdisk -l | grep "Disk" | cut -f2 -d " " | cut -f1 -d ":" > /tmp/disklist
|
||||
fdisk -l | grep "Disk /dev/" | cut -f2 -d " " | cut -f1 -d ":" > /tmp/disklist
|
||||
|
||||
# filter out extraneous options
|
||||
> /tmp/boot_device_list
|
||||
|
Loading…
Reference in New Issue
Block a user