From e0e0019250ee5904d036d310d820db88c0575d0d Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 18 May 2019 19:59:22 -0500 Subject: [PATCH] kexec-select-boot: correct order of USB boot options Using sort on USB boot options produces a reverse-ordered list, leading users to often select the wrong option. Add the -r parameter to sort to correct the list order and make the default option the first in the list. Signed-off-by: Matt DeVillier --- initrd/bin/kexec-select-boot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/initrd/bin/kexec-select-boot b/initrd/bin/kexec-select-boot index 6a782a82..5f14dfcb 100755 --- a/initrd/bin/kexec-select-boot +++ b/initrd/bin/kexec-select-boot @@ -175,7 +175,7 @@ scan_options() { die "Failed to parse any boot options" fi if [ "$unique" = 'y' ]; then - sort $option_file | uniq > $TMP_MENU_FILE + sort -r $option_file | uniq > $TMP_MENU_FILE else cp $option_file $TMP_MENU_FILE fi