diff options
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r-- | cloudinit/util.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py index 89889459..db60b9d2 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -543,6 +543,11 @@ def is_ipv4(instr): @lru_cache() +def is_BSD(): + return 'BSD' in platform.system() + + +@lru_cache() def is_FreeBSD(): return system_info()['variant'] == "freebsd" @@ -625,7 +630,7 @@ def get_linux_distro(): flavor = match.groupdict()['codename'] if distro_name == 'rhel': distro_name = 'redhat' - elif 'BSD' in platform.system(): + elif is_BSD(): distro_name = platform.system().lower() distro_version = platform.release() else: |