mirror of https://github.com/docker/docs.git
Code simplification that @tiborvass requested
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
This commit is contained in:
parent
ec5e22efe3
commit
e8e60befd6
|
@ -445,8 +445,7 @@ func (daemon *Daemon) setupResolvconfWatcher() error {
|
||||||
select {
|
select {
|
||||||
case event := <-watcher.Events:
|
case event := <-watcher.Events:
|
||||||
if event.Name == "/etc/resolv.conf" &&
|
if event.Name == "/etc/resolv.conf" &&
|
||||||
(event.Op&fsnotify.Write != 0 ||
|
(event.Op & (fsnotify.Write | fsnotify.Create) != 0) {
|
||||||
event.Op&fsnotify.Create != 0) {
|
|
||||||
// verify a real change happened before we go further--a file write may have happened
|
// verify a real change happened before we go further--a file write may have happened
|
||||||
// without an actual change to the file
|
// without an actual change to the file
|
||||||
updatedResolvConf, newResolvConfHash, err := resolvconf.GetIfChanged()
|
updatedResolvConf, newResolvConfHash, err := resolvconf.GetIfChanged()
|
||||||
|
|
Loading…
Reference in New Issue