summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_set_passwords.py
diff options
context:
space:
mode:
authorNate House nathan.house@rackspace.com <>2014-02-06 15:38:30 -0600
committerNate House nathan.house@rackspace.com <>2014-02-06 15:38:30 -0600
commit2afb3d2942c5c9e10688186a345d67a703ea7878 (patch)
treeefd74080162548a04e1d6380caac04d5b185c785 /cloudinit/config/cc_set_passwords.py
parent805ac503531d27651f0ad4b1a590a488545a0887 (diff)
parent122085edf26508d7f9cdf930c8a31f089159ccf5 (diff)
downloadvyos-cloud-init-2afb3d2942c5c9e10688186a345d67a703ea7878.tar.gz
vyos-cloud-init-2afb3d2942c5c9e10688186a345d67a703ea7878.zip
Added arch distro class to merge request
Diffstat (limited to 'cloudinit/config/cc_set_passwords.py')
-rw-r--r--cloudinit/config/cc_set_passwords.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py
index 646c3f8b..4a3b21af 100644
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -139,6 +139,8 @@ def handle(_name, cfg, cloud, log, args):
cmd = cloud.distro.init_cmd # Default service
cmd.append(cloud.distro.get_option('ssh_svcname', 'ssh'))
cmd.append('restart')
+ if 'systemctl' in cmd: # Switch action ordering
+ cmd[1], cmd[2] = cmd[2], cmd[1]
cmd = filter(None, cmd) # Remove empty arguments
util.subp(cmd)
log.debug("Restarted the ssh daemon")