move configs to dkl crate
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
use eyre::{format_err, Result};
|
||||
use eyre::{Result, format_err};
|
||||
use log::{error, info, warn};
|
||||
use std::collections::BTreeSet as Set;
|
||||
use std::os::unix::fs::symlink;
|
||||
use tokio::sync::Mutex;
|
||||
use tokio::{fs, process::Command};
|
||||
|
||||
use crate::{bootstrap::config::Config, cmd::version::version_string, dklog, input, utils};
|
||||
use crate::{cmd::version::version_string, dklog, input, utils};
|
||||
use dkl::bootstrap::Config;
|
||||
|
||||
mod bootstrap;
|
||||
mod dmcrypt;
|
||||
@ -390,9 +391,9 @@ fn cmd_str(prog: &str, args: &[&str]) -> (String, Command) {
|
||||
|
||||
#[allow(unused)]
|
||||
async fn child_reaper() {
|
||||
use nix::sys::wait::{waitpid, WaitPidFlag};
|
||||
use nix::sys::wait::{WaitPidFlag, waitpid};
|
||||
use nix::unistd::Pid;
|
||||
use tokio::signal::unix::{signal, SignalKind};
|
||||
use tokio::signal::unix::{SignalKind, signal};
|
||||
|
||||
let Ok(mut sigs) =
|
||||
signal(SignalKind::child()).inspect_err(|e| warn!("failed to setup SIGCHLD handler: {e}"))
|
||||
@ -416,7 +417,7 @@ async fn switch_root(root: &str) -> Result<()> {
|
||||
info!("killing all processes and switching root");
|
||||
dklog::LOG.close().await;
|
||||
|
||||
use nix::sys::signal::{kill, SIGKILL};
|
||||
use nix::sys::signal::{SIGKILL, kill};
|
||||
use nix::unistd::Pid;
|
||||
|
||||
if let Err(e) = kill(Pid::from_raw(-1), SIGKILL) {
|
||||
|
||||
Reference in New Issue
Block a user