~ubuntu-branches/ubuntu/saucy/cloud-init/saucy

« back to all changes in this revision

Viewing changes to cloudinit/config/cc_ssh.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-07-10 13:35:59 UTC
  • Revision ID: package-import@ubuntu.com-20130710133559-2pdyhqu5s6uh9shm
* New upstream snapshot.
  * Fix omnibus support (LP: #1182265)
  * invoke 'initctl reload-configuration' on upstart jobs again
    (LP: #1124384)
* Remove unowned files in /etc/apt/apt.conf.d/ after purge. (Closes #674237)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vi: ts=4 expandtab
2
2
#
3
3
#    Copyright (C) 2009-2010 Canonical Ltd.
4
 
#    Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
 
4
#    Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P.
5
5
#
6
6
#    Author: Scott Moser <scott.moser@canonical.com>
7
7
#    Author: Juerg Haefliger <juerg.haefliger@hp.com>
85
85
                    util.subp(cmd, capture=False)
86
86
                log.debug("Generated a key for %s from %s", pair[0], pair[1])
87
87
            except:
88
 
                util.logexc(log, ("Failed generated a key"
89
 
                                  " for %s from %s"), pair[0], pair[1])
 
88
                util.logexc(log, "Failed generated a key for %s from %s",
 
89
                            pair[0], pair[1])
90
90
    else:
91
91
        # if not, generate them
92
92
        genkeys = util.get_cfg_option_list(cfg,
102
102
                    with util.SeLinuxGuard("/etc/ssh", recursive=True):
103
103
                        util.subp(cmd, capture=False)
104
104
                except:
105
 
                    util.logexc(log, ("Failed generating key type"
106
 
                                      " %s to file %s"), keytype, keyfile)
 
105
                    util.logexc(log, "Failed generating key type %s to "
 
106
                                "file %s", keytype, keyfile)
107
107
 
108
108
    try:
109
109
        (users, _groups) = ds.normalize_users_groups(cfg, cloud.distro)