mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: preserve search domains when reverting resolv.conf
Fixes search domains not being preserved when the resolv.conf file is reverted to its previous state. This ensures that important domain search configuration is maintained during DNS configuration changes. The search domains handling was missing in setResolvConf function, which is responsible for restoring DNS settings.
This commit is contained in:
committed by
Cuong Manh Le
parent
8dc34f8bf5
commit
628c4302aa
@@ -70,10 +70,17 @@ func ControlSocketName() string {
|
||||
}
|
||||
}
|
||||
|
||||
// logf is a function variable used for logging formatted debug messages with optional arguments.
|
||||
// This is used only when creating a new DNS OS configurator.
|
||||
var logf = func(format string, args ...any) {
|
||||
mainLog.Load().Debug().Msgf(format, args...)
|
||||
}
|
||||
|
||||
// noopLogf is like logf but discards formatted log messages and arguments without any processing.
|
||||
//
|
||||
//lint:ignore U1000 use in newLoopbackOSConfigurator
|
||||
var noopLogf = func(format string, args ...any) {}
|
||||
|
||||
var svcConfig = &service.Config{
|
||||
Name: ctrldServiceName,
|
||||
DisplayName: "Control-D Helper Service",
|
||||
|
||||
Reference in New Issue
Block a user