mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-19 17:31:39 +02:00
Use resolvconf as fallback
This commit is contained in:
parent
27f9124d28
commit
1a6dcae4c1
@ -46,7 +46,7 @@ type resolvconf struct {
|
|||||||
|
|
||||||
func detectResolvconfType() (resolvconfType, error) {
|
func detectResolvconfType() (resolvconfType, error) {
|
||||||
cmd := exec.Command(resolvconfCommand, "--version")
|
cmd := exec.Command(resolvconfCommand, "--version")
|
||||||
out, err := cmd.Output()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return typeOpenresolv, fmt.Errorf("determine resolvconf type: %w", err)
|
return typeOpenresolv, fmt.Errorf("determine resolvconf type: %w", err)
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ func newResolvConfConfigurator(wgInterface string) (*resolvconf, error) {
|
|||||||
implType, err := detectResolvconfType()
|
implType, err := detectResolvconfType()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warnf("failed to detect resolvconf type, defaulting to openresolv: %v", err)
|
log.Warnf("failed to detect resolvconf type, defaulting to openresolv: %v", err)
|
||||||
implType = typeOpenresolv
|
implType = typeResolvconf
|
||||||
} else {
|
} else {
|
||||||
log.Infof("detected resolvconf type: %v", implType)
|
log.Infof("detected resolvconf type: %v", implType)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user