move configs to dkl crate

This commit is contained in:
Mikaël Cluseau
2025-07-17 16:15:36 +02:00
parent e30a46d62b
commit 423a9c53e6
15 changed files with 1419 additions and 350 deletions

View File

@ -3,12 +3,12 @@ use log::{info, warn};
use std::collections::BTreeSet as Set;
use tokio::process::Command;
use super::{format_err, retry_or_ignore, Config, Result};
use super::{Result, format_err, retry_or_ignore};
use crate::{
bootstrap::config,
udev,
utils::{select_n_by_regex, NameAliases},
utils::{NameAliases, select_n_by_regex},
};
use dkl::bootstrap::{Config, Network};
pub async fn setup(cfg: &Config) {
if cfg.networks.is_empty() {
@ -23,7 +23,7 @@ pub async fn setup(cfg: &Config) {
}
}
async fn setup_network(net: &config::Network, assigned: &mut Set<String>) -> Result<()> {
async fn setup_network(net: &Network, assigned: &mut Set<String>) -> Result<()> {
info!("setting up network {}", net.name);
let netdevs = get_interfaces()?