mirror of
https://github.com/linuxboot/heads.git
synced 2025-04-19 08:36:18 +00:00
config-gui: Show error if no disks found
Currently, if no disks on system, selection of a new /boot device will silently fail and simply return the user to the previous screen. Add an error dialog if no disks found. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
32716c8ce6
commit
43b50788c6
@ -31,7 +31,11 @@ while true; do
|
||||
;;
|
||||
"b" )
|
||||
CURRENT_OPTION=`grep 'CONFIG_BOOT_DEV=' /tmp/config | tail -n1 | cut -f2 -d '=' | tr -d '"'`
|
||||
fdisk -l | grep "Disk" | cut -f2 -d " " | cut -f1 -d ":" > /tmp/disklist.txt
|
||||
if ! fdisk -l | grep "Disk" | 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
|
||||
fi
|
||||
# filter out extraneous options
|
||||
> /tmp/boot_device_list.txt
|
||||
for i in `cat /tmp/disklist.txt`; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user