diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_set_passwords.py | 2 | ||||
-rw-r--r-- | cloudinit/distros/__init__.py | 1 | ||||
-rw-r--r-- | cloudinit/distros/gentoo.py | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py index 06974248..579735ed 100644 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -136,7 +136,7 @@ def handle(_name, cfg, cloud, log, args): util.write_file(ssh_util.DEF_SSHD_CFG, "\n".join(lines)) try: - cmd = cloud.distro.init_cmd or ['service'] + cmd = cloud.distro.init_cmd cmd.append(cloud.distro.get_option('ssh_svcname', 'ssh')) cmd.append('restart') util.subp(cmd) diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 2b821926..61904b6f 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -53,6 +53,7 @@ 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 = [] # Not implemented def __init__(self, name, cfg, paths): self._paths = paths diff --git a/cloudinit/distros/gentoo.py b/cloudinit/distros/gentoo.py index 82d49fc3..ede40bff 100644 --- a/cloudinit/distros/gentoo.py +++ b/cloudinit/distros/gentoo.py @@ -156,7 +156,8 @@ class Distro(distros.Distro): elif args and isinstance(args, list): cmd.extend(args) - cmd.append(command) + if command: + cmd.append(command) pkglist = util.expand_package_list('%s-%s', pkgs) cmd.extend(pkglist) |