mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 17:42:20 +00:00
fix(bls): allow BLS directories without an entries directory
Autoconfigure detects BLS when either \loader\loader.conf or \loader\entries exists, but the BLS generator required the entries directory and failed the boot without it. This broke ESPs that only have a loader.conf, such as UKI-only systemd-boot setups. Generate no entries when the directory is missing.
This commit is contained in:
1 parent
6f84a1014a
commit
dbc292e369
1 file changed
+9
@@ -60,6 +60,15 @@ pub fn generate(context: Rc<SproutContext>, bls: &BlsConfiguration) -> Result<Ve
|
||||
.context("unable to open bls filesystem")?;
|
||||
let mut fs = FileSystem::new(fs);
|
||||
|
||||
// The entries directory is optional, as a BLS directory may only contain a loader.conf file.
|
||||
// If it does not exist, there are no entries to generate.
|
||||
if !fs
|
||||
.try_exists(&entries_path)
|
||||
.context("unable to check for bls entries directory")?
|
||||
{
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
|
||||
// Read the BLS entries directory.
|
||||
let entries_iter = fs
|
||||
.read_dir(&entries_path)
|
||||
|
||||
Reference in new issue
Block a user