parent
3766d88c83
commit
15e9c08a8a
|
@ -8,8 +8,8 @@ use wgctrl::{Backend, Device, DeviceUpdate, InterfaceName, PeerConfigBuilder};
|
||||||
|
|
||||||
fn cmd(bin: &str, args: &[&str]) -> Result<process::Output, Error> {
|
fn cmd(bin: &str, args: &[&str]) -> Result<process::Output, Error> {
|
||||||
let output = Command::new(bin).args(args).output()?;
|
let output = Command::new(bin).args(args).output()?;
|
||||||
log::debug!("{} {}", bin, args.join(" "));
|
log::debug!("cmd: {} {}", bin, args.join(" "));
|
||||||
log::debug!("status code {:?}", output.status.code());
|
log::debug!("status: {:?}", output.status.code());
|
||||||
log::trace!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
log::trace!("stdout: {}", String::from_utf8_lossy(&output.stdout));
|
||||||
log::trace!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
log::trace!("stderr: {}", String::from_utf8_lossy(&output.stderr));
|
||||||
if output.status.success() {
|
if output.status.success() {
|
||||||
|
@ -91,7 +91,6 @@ pub fn up(
|
||||||
if !network.no_routing {
|
if !network.no_routing {
|
||||||
add_route(interface, address)?;
|
add_route(interface, address)?;
|
||||||
}
|
}
|
||||||
cmd("ip", &["link"])?;
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue