From 6045bcc53d43a7d876d78c13d58cb7e94b282010 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Mon, 31 Oct 2011 11:04:31 -0400 Subject: make ssh service name configurable Fedora's ssh service name is named 'sshd', Ubuntu's is 'ssh'. This makes that configurable. TODO: document ssh_svcname. taken from git://pkgs.fedoraproject.org/cloud-init.git commit 87f33190f43d2b26cced4597e7298835024466c2 Author: Garrett Holmstrom Patch11: cloud-init-0.6.2-sshsvc.patch --- cloudinit/CloudConfig/cc_set_passwords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/CloudConfig/cc_set_passwords.py b/cloudinit/CloudConfig/cc_set_passwords.py index 92f0aac7..edfbaeeb 100644 --- a/cloudinit/CloudConfig/cc_set_passwords.py +++ b/cloudinit/CloudConfig/cc_set_passwords.py @@ -104,7 +104,7 @@ def handle(name,cfg,cloud,log,args): errors.append(e) try: - p = util.subp(['service', 'ssh', 'restart']) + p = util.subp(['service', cfg.get('ssh_svcname', 'ssh'), 'restart']) log.debug("restarted sshd") except: log.warn("restart of ssh failed") -- cgit v1.2.3