Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Older versions of Leap&SLE+non-UEFI also have other hotkey #3764

Conversation

SergioAtSUSE
Copy link
Member

@SergioAtSUSE SergioAtSUSE force-pushed the fix_bootloader_hotkey_42.2_no_uefi branch from 84259b6 to fe1ce33 Compare October 20, 2017 16:11
@SergioAtSUSE SergioAtSUSE force-pushed the fix_bootloader_hotkey_42.2_no_uefi branch from fe1ce33 to 911d973 Compare October 20, 2017 16:29
$cmd{bootloader} = 'alt-t'; # older versions
}
elsif (is_leap) {
if (is_leap && check_var('VERSION', '15')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, don't use a version specific check. We don't want to revisit this for '15.0' or '15-SP1'. What's wrong with the old code?

Copy link
Member Author

@SergioAtSUSE SergioAtSUSE Oct 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem of the old one, is that it is a too complicated if-else-statements when the only version that doesn't match the pattern (UEFI->t, non-UEFI->r) is Leap 15. So I simplified the to a single if-statement.

Would it be better if I use?:

if (is_leap && leap_version_at_least('15')

$cmd{bootloader} = 'alt-l'; # leap 15
}
else {
$cmd{bootloader} = check_var('UEFI', '1') ? 'alt-t' : 'alt-r'; # rest except uefi
$cmd{bootloader} = check_var('UEFI', '1') ? 'alt-t' : 'alt-r'; # UEFI or non-UEFI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the comment is redundant anyway. There is a check for UEFI so no need to write "UEFI or non-UEFI".

@SergioAtSUSE
Copy link
Member Author

Superseeded by: #3762

@SergioAtSUSE SergioAtSUSE deleted the fix_bootloader_hotkey_42.2_no_uefi branch October 23, 2017 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants