diff options
| author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-17 21:43:33 -0200 |
|---|---|---|
| committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-17 21:43:33 -0200 |
| commit | ca79037957522708830ae159b6cc7a05edbac340 (patch) | |
| tree | e645830cf13393af8b0ad5e097bb260ded2ef20e /lib/puppet/parser | |
| parent | 85d7fc922011bc2a619f0e093b69f0a37a88f59c (diff) | |
| parent | 576bbf09d8516809d7373dc9b4e725ce2151a463 (diff) | |
| download | puppet-sshd-ca79037957522708830ae159b6cc7a05edbac340.tar.gz puppet-sshd-ca79037957522708830ae159b6cc7a05edbac340.tar.bz2 | |
Merge branch 'master' of git://labs.riseup.net/shared-sshd
Conflicts:
templates/sshd_config/Ubuntu_precise.erb
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/functions/ssh_keygen.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/ssh_keygen.rb b/lib/puppet/parser/functions/ssh_keygen.rb index 09b3d3b..597315e 100644 --- a/lib/puppet/parser/functions/ssh_keygen.rb +++ b/lib/puppet/parser/functions/ssh_keygen.rb @@ -14,7 +14,10 @@ Puppet::Parser::Functions::newfunction(:ssh_keygen, :type => :rvalue, :doc => end dir = File.dirname(private_key_path) - Puppet::Util.recmkdir(dir,0700) unless File.directory?(dir) + unless File.directory?(dir) + require 'fileutils' + FileUtils.mkdir_p(dir, :mode => 0700) + end unless [private_key_path,public_key_path].all?{|path| File.exists?(path) } output = Puppet::Util.execute(['/usr/bin/ssh-keygen','-t', 'rsa', '-b', '4096', '-f', private_key_path, '-P', '', '-q']) raise Puppet::ParseError, "Something went wrong during key generation! Output: #{output}" unless output.empty? |
