From 8f0e9598ca37258f5fb357d275494c06a6b9d9eb Mon Sep 17 00:00:00 2001 From: Atanas Dinov Date: Thu, 11 Apr 2024 12:24:59 +0300 Subject: [PATCH] Reorder wired connections removal (#63) Signed-off-by: Atanas Dinov --- src/apply_conf.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/apply_conf.rs b/src/apply_conf.rs index bbe6950..accac41 100644 --- a/src/apply_conf.rs +++ b/src/apply_conf.rs @@ -34,9 +34,6 @@ pub(crate) fn apply(source_dir: &str) -> Result<(), anyhow::Error> { fs::write(HOSTNAME_FILE, &host.hostname).context("Setting hostname")?; info!("Set hostname: {}", host.hostname); - disable_wired_connections(CONFIG_DIR, RUNTIME_SYSTEM_CONNECTIONS_DIR) - .context("Disabling wired connections")?; - let local_interfaces = detect_local_interfaces(&host, network_interfaces); copy_connection_files( host, @@ -44,6 +41,10 @@ pub(crate) fn apply(source_dir: &str) -> Result<(), anyhow::Error> { source_dir, STATIC_SYSTEM_CONNECTIONS_DIR, ) + .context("Copying connection files")?; + + disable_wired_connections(CONFIG_DIR, RUNTIME_SYSTEM_CONNECTIONS_DIR) + .context("Disabling wired connections") } fn parse_config(source_dir: &str) -> Result, anyhow::Error> {