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 <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2019-05-18 19:59:22 -05:00
parent 5eb758711d
commit e0e0019250
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

View File

@ -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