Skip to content

Commit

Permalink
Fix issue with unsupported GRUB version
Browse files Browse the repository at this point in the history
I got an error with Suse Leap 15.0 while trying to write an ISO image to the usb stick, so this patch healed it.
  • Loading branch information
8kto authored Dec 1, 2018
1 parent e2a7468 commit bffb5c9
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/woeusb
Original file line number Diff line number Diff line change
Expand Up @@ -763,17 +763,20 @@ check_runtime_dependencies(){
result=failed
fi

if command -v grub-install &> /dev/null; then
command_grubinstall_ref=grub-install
name_grub_prefix_ref=grub
elif command -v grub2-install &> /dev/null; then
command_grubinstall_ref=grub2-install
name_grub_prefix_ref=grub2
else
echo_with_color red "${FUNCNAME[0]}: Error: grub-install or grub2-install command not found!" >&2
echo_with_color red "${FUNCNAME[0]}: Error: Please make sure that GNU GRUB is properly installed!" >&2
result=failed
fi
if command -v grub-install.unsupported &> /dev/null; then
command_grubinstall_ref=grub-install.unsupported
name_grub_prefix_ref=grub
elif command -v grub-install &> /dev/null; then
command_grubinstall_ref=grub-install
name_grub_prefix_ref=grub
elif command -v grub2-install &> /dev/null; then
command_grubinstall_ref=grub2-install
name_grub_prefix_ref=grub2
else
echo_with_color red "${FUNCNAME[0]}: Error: grub-install or grub2-install command not found!" >&2
echo_with_color red "${FUNCNAME[0]}: Error: Please make sure that GNU GRUB is properly installed!" >&2
result=failed
fi

if [ "${result}" == failed ]; then
return 1
Expand Down

0 comments on commit bffb5c9

Please sign in to comment.