mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 17:22:53 +00:00
Fix check for valid boot options
-r will always succeed since the file will be generated regardless of number of boot entries found. Use -s instead to check for zero file size. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
parent
4c64ca631a
commit
97143953e8
@ -173,7 +173,7 @@ scan_options() {
|
||||
kexec-parse-bls "$bootdir" "$i" "$bootdir/loader/entries" >> $option_file
|
||||
done
|
||||
fi
|
||||
if [ ! -r $option_file ]; then
|
||||
if [ ! -s $option_file ]; then
|
||||
die "Failed to parse any boot options"
|
||||
fi
|
||||
if [ "$unique" = 'y' ]; then
|
||||
|
@ -209,7 +209,7 @@ set_default_boot_option()
|
||||
kexec-parse-bls "/boot" "$i" "/boot/loader/entries" >> $option_file
|
||||
done
|
||||
fi
|
||||
[ ! -r $option_file ] \
|
||||
[ ! -s $option_file ] \
|
||||
&& whiptail_error_die "Failed to parse any boot options"
|
||||
|
||||
# sort boot options
|
||||
|
Loading…
x
Reference in New Issue
Block a user