summaryrefslogtreecommitdiff
path: root/cloudinit/distros/__init__.py
diff options
context:
space:
mode:
authorNate House nathan.house@rackspace.com <>2014-02-04 16:09:09 -0600
committerNate House nathan.house@rackspace.com <>2014-02-04 16:09:09 -0600
commit6e0aaf44c7a869d35a962a2d60be2d833023d4ec (patch)
tree2cf2bf8727e389c53e25190becb2ba44ac2ffd9d /cloudinit/distros/__init__.py
parent6922fc8294e38ee0780e9d74da7d3ec010a3cd3c (diff)
parent0efeb26736ddae2967c14a9440088594da32070d (diff)
downloadvyos-cloud-init-6e0aaf44c7a869d35a962a2d60be2d833023d4ec.tar.gz
vyos-cloud-init-6e0aaf44c7a869d35a962a2d60be2d833023d4ec.zip
Merge gentoo branch and updated set-password to support systemctl
Diffstat (limited to 'cloudinit/distros/__init__.py')
-rw-r--r--cloudinit/distros/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index b58c8460..8fc0da9f 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -39,6 +39,7 @@ from cloudinit.distros.parsers import hosts
OSFAMILIES = {
'debian': ['debian', 'ubuntu'],
'redhat': ['fedora', 'rhel'],
+ 'gentoo': ['gentoo'],
'freebsd': ['freebsd'],
'suse': ['sles'],
'arch': ['arch'],
@@ -54,12 +55,21 @@ class Distro(object):
ci_sudoers_fn = "/etc/sudoers.d/90-cloud-init-users"
hostname_conf_fn = "/etc/hostname"
tz_zone_dir = "/usr/share/zoneinfo"
+ init_cmd = ['service'] # systemctl, service etc
+ exclude_modules = []
def __init__(self, name, cfg, paths):
self._paths = paths
self._cfg = cfg
self.name = name
+ def is_excluded(self, name):
+ if name in self.exclude_modules:
+ distro = getattr(self, name, None) or getattr(self, 'osfamily')
+ LOG.debug(("Skipping module named %s, distro %s excluded"), name,
+ distro)
+ return True
+
@abc.abstractmethod
def install_packages(self, pkglist):
raise NotImplementedError()