diff options
author | Brett Holman <bholman.devel@gmail.com> | 2022-02-04 12:26:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 13:26:47 -0600 |
commit | 75a5c8f2dcb28167ef6ce6941a498ae4b8d2d0ac (patch) | |
tree | 923bfe561ac0b298ceac2b3321a7d985cb7ab924 /cloudinit | |
parent | 6d817e94beb404d3917bf973bcb728aa6cc22ffe (diff) | |
download | vyos-cloud-init-75a5c8f2dcb28167ef6ce6941a498ae4b8d2d0ac.tar.gz vyos-cloud-init-75a5c8f2dcb28167ef6ce6941a498ae4b8d2d0ac.zip |
cc_salt_minion freebsd fix for rc.conf (#1236)
This fixes a bug that prevents the salt module from enabling the salt minion in rc.conf.
For more details:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254339
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_salt_minion.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py index b2e5eefd..0eb46664 100644 --- a/cloudinit/config/cc_salt_minion.py +++ b/cloudinit/config/cc_salt_minion.py @@ -46,7 +46,7 @@ specify them with ``pkg_name``, ``service_name`` and ``config_dir``. import os from cloudinit import safeyaml, subp, util -from cloudinit.distros import rhel_util +from cloudinit.distros import bsd_utils # Note: see https://docs.saltstack.com/en/latest/topics/installation/ # Note: see https://docs.saltstack.com/en/latest/ref/configuration/ @@ -61,7 +61,7 @@ class SaltConstants(object): # constants tailored for FreeBSD if util.is_FreeBSD(): - self.pkg_name = "py36-salt" + self.pkg_name = "py-salt" self.srv_name = "salt_minion" self.conf_dir = "/usr/local/etc/salt" # constants for any other OS @@ -128,9 +128,7 @@ def handle(name, cfg, cloud, log, _args): # we need to have the salt minion service enabled in rc in order to be # able to start the service. this does only apply on FreeBSD servers. if cloud.distro.osfamily == "freebsd": - rhel_util.update_sysconfig_file( - "/etc/rc.conf", {"salt_minion_enable": "YES"} - ) + bsd_utils.set_rc_config_value("salt_minion_enable", "YES") # restart salt-minion. 'service' will start even if not started. if it # was started, it needs to be restarted for config change. |