mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
Currently, ctrld assumes that NetworkManager is not available if writing to /etc/NetworkManager/conf.d return directory not exist error. That would work on most Linux distros. However, cloud provider may do some hacks, causing ctrld confusion and think that NetworkManager is available. Fixing this by checking whether NetworkManager binary presents first. While at it, also fixing a bug when restarting NetworkManager failed causing ctrld hangs. The go-systemd library is not clear about this, but the waitCh channel won't never be closed if error occurred, so we must return immediately instead of receiving from it blindly.
2.2 KiB
2.2 KiB