feat: Added wrapper crate for including ipxe binaries
Audit / cargo audit (push) Failing after 3m4s
Committed / committed (pull_request) Failing after 20s
CI / cargo shear (pull_request) Successful in 4m30s
CI / prek (pull_request) Failing after 5m56s

This commit is contained in:
2026-10-04 02:59:08 +02:00
parent cf8dd0f24d
commit 5601b2ff99
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"];