diff options
author | Brad Davis <brd@FreeBSD.org> | 2021-03-17 23:28:53 +0800 |
---|---|---|
committer | Brad Davis <brd@FreeBSD.org> | 2021-03-17 23:28:53 +0800 |
commit | 287ffcd3a995af34a5082a37e5c07fdea0bca71f (patch) | |
tree | 6d8896ba10e4ff63925694c215855ac5be373425 /net | |
parent | 8f0f9c12619a44fb133184ca56e4bd6debad9ae0 (diff) | |
download | freebsd-ports-gnome-287ffcd3a995af34a5082a37e5c07fdea0bca71f.tar.gz freebsd-ports-gnome-287ffcd3a995af34a5082a37e5c07fdea0bca71f.tar.zst freebsd-ports-gnome-287ffcd3a995af34a5082a37e5c07fdea0bca71f.zip |
net/cloud-init: Fix modifying rc.conf in cc_salt_minion
PR: 254339
Approved by: Andrey Fesenko (maintainer), swills
Diffstat (limited to 'net')
-rw-r--r-- | net/cloud-init/Makefile | 1 | ||||
-rw-r--r-- | net/cloud-init/files/patch-cloudinit_config_cc__salt__minion.py | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile index 138b20c5c9a6..1f4936799c6b 100644 --- a/net/cloud-init/Makefile +++ b/net/cloud-init/Makefile @@ -2,6 +2,7 @@ PORTNAME= cloud-init DISTVERSION= 20.4.1 +PORTREVISION= 1 CATEGORIES= net python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/net/cloud-init/files/patch-cloudinit_config_cc__salt__minion.py b/net/cloud-init/files/patch-cloudinit_config_cc__salt__minion.py new file mode 100644 index 000000000000..b1a65b7bd71c --- /dev/null +++ b/net/cloud-init/files/patch-cloudinit_config_cc__salt__minion.py @@ -0,0 +1,21 @@ +--- cloudinit/config/cc_salt_minion.py.orig 2021-01-15 17:33:05 UTC ++++ cloudinit/config/cc_salt_minion.py +@@ -46,7 +46,7 @@ specify them with ``pkg_name``, ``service_name`` and ` + 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/ +@@ -125,8 +141,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. |