src/api2/config/network.rs: allow to update 'auto' flag
This commit is contained in:
@ -21,7 +21,7 @@ impl Interface {
|
||||
pub fn new(name: String) -> Self {
|
||||
Self {
|
||||
name,
|
||||
autostart: false,
|
||||
auto: false,
|
||||
exists: false,
|
||||
active: false,
|
||||
method_v4: None,
|
||||
@ -154,7 +154,7 @@ impl Interface {
|
||||
|
||||
if self.method_v4.is_none() && self.method_v6.is_none() { return Ok(()); }
|
||||
|
||||
if self.autostart {
|
||||
if self.auto {
|
||||
writeln!(w, "auto {}", self.name)?;
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ impl <R: BufRead> NetworkParser<R> {
|
||||
|
||||
for iface in auto_flag.iter() {
|
||||
if let Some(interface) = config.interfaces.get_mut(iface) {
|
||||
interface.autostart = true;
|
||||
interface.auto = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user