Skip to content

Commit

Permalink
Reorder wired connections removal (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Dinov <[email protected]>
  • Loading branch information
atanasdinov authored Apr 11, 2024
1 parent 90f7d02 commit 8f0e959
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/apply_conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ 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,
local_interfaces,
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<Vec<Host>, anyhow::Error> {
Expand Down

0 comments on commit 8f0e959

Please sign in to comment.