Navigation Menu

Skip to content

Commit

Permalink
No error when deactivate is called while not activated
Browse files Browse the repository at this point in the history
Fixes #72
  • Loading branch information
rs committed Apr 8, 2020
1 parent 0621f92 commit e66b842
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions host/dns_linux.go
Expand Up @@ -64,6 +64,9 @@ func SetDNS(dns string) error {

func ResetDNS() error {
if err := os.Rename(resolvBackupFile, resolvFile); err != nil {
if os.IsNotExist(err) {
return nil
}
return fmt.Errorf("restore resolv.conf: %v", err)
}
if err := restoreNetworkManagerResolver(); err != nil {
Expand Down

0 comments on commit e66b842

Please sign in to comment.