netconfigd: continue if interfaces.json does not exist

This commit is contained in:
Michael Stapelberg 2020-02-15 23:35:51 +01:00
parent 23961749ef
commit ef60a01f3f

View File

@ -219,6 +219,9 @@ func LinkAddress(dir, ifname string) (net.IP, error) {
func applyInterfaces(dir, root string) error {
b, err := ioutil.ReadFile(filepath.Join(dir, "interfaces.json"))
if err != nil {
if os.IsNotExist(err) {
return nil
}
return err
}
var cfg InterfaceConfig