feat: Added wrapper crate for including ipxe binaries
CI / cargo shear (pull_request) Successful in 6m23s
Committed / committed (pull_request) Failing after 3m11s
CI / prek (pull_request) Failing after 7m47s

This commit is contained in:
2026-10-04 03:41:31 +02:00
parent 721ce459de
commit 71706588d3
9 changed files with 121 additions and 34 deletions
+6 -1
View File
@@ -11,6 +11,7 @@ use crete::tftp::ServerError;
use crete::{get_configs_path, get_repo_path, set_repo_path, tftp};
use futures::StreamExt;
use futures::future::join_all;
use ipxe::IPXE_DIR;
use minijinja::context;
use regex::Regex;
use thiserror::Error;
@@ -117,7 +118,11 @@ async fn main() -> Result<(), Error> {
println!("{filename}");
async move {
if let Some(caps) = re.captures(&filename) {
const IPXE_PATTERN: &str = "ipxe/";
if let Some(filename) = filename.strip_prefix(IPXE_PATTERN) {
println!("Looking for iPXE binary: {filename}");
Some(IPXE_DIR.get_file(filename)?.contents().to_owned())
} else if let Some(caps) = re.captures(&filename) {
let cluster = &caps["cluster"];
let node = &caps["node"];