feat: Added wrapper crate for including ipxe binaries

This commit is contained in:
2026-10-04 05:53:46 +02:00
parent b728cd7d22
commit 0a72e2e8d9
9 changed files with 120 additions and 2 deletions
+5 -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;
@@ -115,7 +116,10 @@ async fn main() -> Result<(), Error> {
let re = re.clone();
async move {
if let Some(caps) = re.captures(&filename) {
const IPXE_PATTERN: &str = "ipxe/";
if let Some(filename) = filename.strip_prefix(IPXE_PATTERN) {
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"];