mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-02 12:45:10 +02:00
cmd/cli: fix watching symlink /etc/resolv.conf
Currently, ctrld watches changes to /etc/resolv.conf file, then reverting to the expected settings. However, if /etc/resolv.conf is a symlink, changes made to the target file maynot be seen if it's not under /etc directory. To fix this, just evaluate the /etc/resolv.conf file before watching it.
This commit is contained in:
committed by
Cuong Manh Le
parent
139dd62ff3
commit
9ddedf926e
@@ -24,6 +24,8 @@ import (
|
||||
"github.com/Control-D-Inc/ctrld/internal/resolvconffile"
|
||||
)
|
||||
|
||||
const resolvConfBackupFailedMsg = "open /etc/resolv.pre-ctrld-backup.conf: read-only file system"
|
||||
|
||||
// allocate loopback ip
|
||||
// sudo ip a add 127.0.0.2/24 dev lo
|
||||
func allocateIP(ip string) error {
|
||||
|
||||
Reference in New Issue
Block a user