cloud-init/cloud-init-break-resolv-symlink.patch
Robert Schweikert ae07dd3a29 - Support python 3.13:
+ pep-594-drop-pipes.patch, gh#canonical/cloud-init#4392
  + cloud-init-fix-python313.patch, gh#canonical/cloud-init#4669
  + cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch gh#canonical/cloud-init#5052

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=241
2025-01-21 21:05:02 +00:00

15 lines
662 B
Diff

--- cloudinit/net/sysconfig.py.orig
+++ cloudinit/net/sysconfig.py
@@ -998,6 +998,11 @@ class Renderer(renderer.Renderer):
network_state, existing_dns_path=dns_path
)
if resolv_content:
+ # netconfig checks if /etc/resolv.conf is a symlink and if
+ # that is true will write it's version of the file clobbering
+ # our changes.
+ if os.path.islink(dns_path):
+ os.unlink(dns_path)
util.write_file(dns_path, resolv_content, file_mode)
if self.networkmanager_conf_path:
nm_conf_path = subp.target_path(