]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
fix deprecation warning 'Puppet::Util.execute is deprecated; please use Puppet::Util...
authormh <mh@immerda.ch>
Wed, 4 Dec 2013 21:54:44 +0000 (22:54 +0100)
committermh <mh@immerda.ch>
Wed, 4 Dec 2013 21:54:44 +0000 (22:54 +0100)
lib/puppet/parser/functions/ssh_keygen.rb

index 597315e76ec5f08381918a59871a25b53fcbf696..d411a28f30cd251b9ee088d704b6e7d28b43e6cb 100644 (file)
@@ -19,7 +19,9 @@ Puppet::Parser::Functions::newfunction(:ssh_keygen, :type => :rvalue, :doc =>
       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'])
+      output = Puppet::Util::Execution.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?
     end
     [File.read(private_key_path),File.read(public_key_path)]