Ignore warning if nm ignore file is empty

master
xSmurf 10 years ago
parent 2313bd6a34
commit 77136cb5ea

@ -27,9 +27,11 @@ func BridgeInit(bridgeMAC string, nmIgnoreFile string, log *logging.Logger) (*Ho
BridgeMAC: bridgeMAC, BridgeMAC: bridgeMAC,
} }
if nmIgnoreFile != "" {
if _, err := os.Stat(nmIgnoreFile); os.IsNotExist(err) { if _, err := os.Stat(nmIgnoreFile); os.IsNotExist(err) {
log.Warning("Warning! Network Manager may not properly configured to ignore the bridge interface! This may result in management conflicts!") log.Warning("Warning! Network Manager may not properly configured to ignore the bridge interface! This may result in management conflicts!")
} }
}
br, err := tenus.BridgeFromName(ozDefaultInterfaceBridge) br, err := tenus.BridgeFromName(ozDefaultInterfaceBridge)
if err != nil { if err != nil {

Loading…
Cancel
Save