net/dns: return error from NewOSManager, use it to initialize NM.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2021-04-12 15:51:37 -07:00
parent 4d142ebe06
commit 854d5d36a1
16 changed files with 67 additions and 50 deletions

View File

@ -53,7 +53,7 @@ type resolvconfManager struct {
scriptInstalled bool // libc update script has been installed
}
func newDebianResolvconfManager(logf logger.Logf) *resolvconfManager {
func newDebianResolvconfManager(logf logger.Logf) (*resolvconfManager, error) {
ret := &resolvconfManager{
logf: logf,
listRecordsPath: "/lib/resolvconf/list-records",
@ -86,7 +86,7 @@ func newDebianResolvconfManager(logf logger.Logf) *resolvconfManager {
ret.interfacesDir = "/etc/resolvconf/run/interfaces"
}
return ret
return ret, nil
}
func (m *resolvconfManager) SetDNS(config OSConfig) error {