mirror of
https://github.com/rancher/os.git
synced 2025-07-05 02:56:13 +00:00
25 lines
506 B
Diff
25 lines
506 B
Diff
265,270d264
|
|
< // Ensure only one update at a time checks resolv.conf.
|
|
< if !conf.tryAcquireSema() {
|
|
< return
|
|
< }
|
|
< defer conf.releaseSema()
|
|
<
|
|
276a271,280
|
|
> conf.update(name)
|
|
> }
|
|
>
|
|
> func (conf *resolverConfig) update(name string) {
|
|
> // Ensure only one update at a time checks resolv.conf.
|
|
> if !conf.tryAcquireSema() {
|
|
> return
|
|
> }
|
|
> defer conf.releaseSema()
|
|
>
|
|
293a298,302
|
|
> }
|
|
>
|
|
> func UpdateDnsConf() {
|
|
> resolvConf.initOnce.Do(resolvConf.init)
|
|
> resolvConf.update("/etc/resolv.conf")
|