diff options
author | hamalq <81582959+hamalq@users.noreply.github.com> | 2021-04-15 16:45:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-15 18:45:12 -0500 |
commit | 45db197cfc7e3488baae7dc1053c45da070248f6 (patch) | |
tree | 91b0148c026c619e6f7f9f50064e6d07c1f47fac /cloudinit/distros/freebsd.py | |
parent | 0d90596b56db5d306125ead08c571fc8d44d528e (diff) | |
download | vyos-cloud-init-45db197cfc7e3488baae7dc1053c45da070248f6.tar.gz vyos-cloud-init-45db197cfc7e3488baae7dc1053c45da070248f6.zip |
add prefer_fqdn_over_hostname config option (#859)
the above option allows the user to control the behavior of a distro
hostname selection if both short hostname and FQDN are supplied.
If `prefer_fqdn_over_hostname` is true the FQDN will be selected as
hostname; if false the hostname will be selected
LP: #1921004
Diffstat (limited to 'cloudinit/distros/freebsd.py')
-rw-r--r-- | cloudinit/distros/freebsd.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/cloudinit/distros/freebsd.py b/cloudinit/distros/freebsd.py index dde34d41..9659843f 100644 --- a/cloudinit/distros/freebsd.py +++ b/cloudinit/distros/freebsd.py @@ -27,12 +27,7 @@ class Distro(cloudinit.distros.bsd.BSD): pkg_cmd_remove_prefix = ["pkg", "remove"] pkg_cmd_update_prefix = ["pkg", "update"] pkg_cmd_upgrade_prefix = ["pkg", "upgrade"] - - def _select_hostname(self, hostname, fqdn): - # Should be FQDN if available. See rc.conf(5) in FreeBSD - if fqdn: - return fqdn - return hostname + prefer_fqdn = True # See rc.conf(5) in FreeBSD def _get_add_member_to_group_cmd(self, member_name, group_name): return ['pw', 'usermod', '-n', member_name, '-G', group_name] |