Name update
This commit is contained in:
@@ -68,7 +68,7 @@ pub struct Paths {
|
||||
pub work_dir: PathBuf,
|
||||
/// Directory containing bundled iPXE binaries (undionly.kpxe, snponly.efi, ...).
|
||||
pub ipxe_dir: PathBuf,
|
||||
/// Path to the wimboot binary for Windows ISOs (optional — feature-gated).
|
||||
/// Path to the wimboot binary for Windows ISOs (optional — feature-controlled).
|
||||
pub wimboot_path: Option<PathBuf>,
|
||||
/// Directory under which Windows ISOs are extracted and served via SMB.
|
||||
/// Only used when `settings.windows_enabled = true`. Defaults to
|
||||
@@ -128,16 +128,24 @@ impl Config {
|
||||
/// Call this after loading the TOML file so env takes precedence.
|
||||
pub fn apply_env(&mut self) {
|
||||
if let Ok(v) = std::env::var("OPENPXE_HTTP_PORT") {
|
||||
if let Ok(p) = v.parse() { self.server.http_port = p; }
|
||||
if let Ok(p) = v.parse() {
|
||||
self.server.http_port = p;
|
||||
}
|
||||
}
|
||||
if let Ok(v) = std::env::var("OPENPXE_TFTP_PORT") {
|
||||
if let Ok(p) = v.parse() { self.server.tftp_port = p; }
|
||||
if let Ok(p) = v.parse() {
|
||||
self.server.tftp_port = p;
|
||||
}
|
||||
}
|
||||
if let Ok(v) = std::env::var("OPENPXE_DHCP_PORT") {
|
||||
if let Ok(p) = v.parse() { self.network.dhcp_port = p; }
|
||||
if let Ok(p) = v.parse() {
|
||||
self.network.dhcp_port = p;
|
||||
}
|
||||
}
|
||||
if let Ok(v) = std::env::var("OPENPXE_PUBLIC_IP") {
|
||||
if let Ok(ip) = v.parse() { self.server.public_ip = Some(ip); }
|
||||
if let Ok(ip) = v.parse() {
|
||||
self.server.public_ip = Some(ip);
|
||||
}
|
||||
}
|
||||
if let Ok(v) = std::env::var("OPENPXE_DHCP_MODE") {
|
||||
self.network.dhcp_mode = match v.to_ascii_lowercase().as_str() {
|
||||
|
||||
Reference in New Issue
Block a user