summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-09-05 14:16:37 -0400
committerScott Moser <smoser@ubuntu.com>2014-09-05 14:16:37 -0400
commitfa0cfdee7aeb575343cc63f3fc54a9c1c3b9085b (patch)
treeeea1ed071415bd72887b7f4688387e42f0ce57da
parent9eddc072644bf212d93b2247e1d121e3208546db (diff)
parent3bec4688a7001a3ce9bbfd1a82e691ea94884a9e (diff)
downloadvyos-cloud-init-fa0cfdee7aeb575343cc63f3fc54a9c1c3b9085b.tar.gz
vyos-cloud-init-fa0cfdee7aeb575343cc63f3fc54a9c1c3b9085b.zip
freebsd: fixes for sudo and build-on-freebsd
Use the regular logic to create sudo rules and just supply the correct filename. The temp script in tools/ should install 2 more dependencies.
-rw-r--r--cloudinit/distros/freebsd.py5
-rwxr-xr-xtools/build-on-freebsd1
2 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/distros/freebsd.py b/cloudinit/distros/freebsd.py
index 42ef2290..849834eb 100644
--- a/cloudinit/distros/freebsd.py
+++ b/cloudinit/distros/freebsd.py
@@ -37,6 +37,7 @@ class Distro(distros.Distro):
login_conf_fn = '/etc/login.conf'
login_conf_fn_bak = '/etc/login.conf.orig'
resolv_conf_fn = '/etc/resolv.conf'
+ ci_sudoers_fn = '/usr/local/etc/sudoers.d/90-cloud-init-users'
def __init__(self, name, cfg, paths):
distros.Distro.__init__(self, name, cfg, paths)
@@ -219,10 +220,6 @@ class Distro(distros.Distro):
util.logexc(LOG, "Failed to lock user %s", name)
raise e
- # TODO:
- def write_sudo_rules(self, name, rules, sudo_file=None):
- LOG.debug("[write_sudo_rules] Name: %s", name)
-
def create_user(self, name, **kwargs):
self.add_user(name, **kwargs)
diff --git a/tools/build-on-freebsd b/tools/build-on-freebsd
index 23bdf487..65d783f7 100755
--- a/tools/build-on-freebsd
+++ b/tools/build-on-freebsd
@@ -17,6 +17,7 @@ pkgs="
py27-prettytable
py27-requests py27-six
python py27-cheetah
+ py27-jsonpointer py27-jsonpatch
"
[ -f "$depschecked" ] || pkg install ${pkgs} || fail "install packages"
touch $depschecked