SHA256
1
0
forked from pool/cloud-init
cloud-init/cloud-init-no-nmcfg-needed.patch
Robert Schweikert c9dc72d3d4 - Add cloud-init-no-nmcfg-needed.patch (bsc#1221726)
+ Do not require a NetworkManager config file in order to detect
    NetworkManager as the renderer

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=229
2024-04-05 18:16:25 +00:00

28 lines
815 B
Diff

--- cloudinit/net/network_manager.py.orig
+++ cloudinit/net/network_manager.py
@@ -9,7 +9,6 @@
import configparser
import io
import itertools
-import os
import uuid
from typing import Optional
@@ -401,7 +400,6 @@ def available(target=None):
# It is imported here to avoid circular import
from cloudinit.distros import uses_systemd
- config_present = os.path.isfile(subp.target_path(target, path=NM_CFG_FILE))
nmcli_present = subp.which("nmcli", target=target)
service_active = True
if uses_systemd():
@@ -410,7 +408,7 @@ def available(target=None):
except subp.ProcessExecutionError:
service_active = False
- return config_present and bool(nmcli_present) and service_active
+ return bool(nmcli_present) and service_active
# vi: ts=4 expandtab