]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
recmkdir is gone
authormh <mh@immerda.ch>
Fri, 8 Jun 2012 16:17:23 +0000 (13:17 -0300)
committermh <mh@immerda.ch>
Fri, 8 Jun 2012 16:17:23 +0000 (13:17 -0300)
lib/puppet/parser/functions/ssh_keygen.rb
spec/unit/parser/functions/ssh_keygen.rb
templates/sshd_config/OpenBSD.erb

index 09b3d3b509fac0c8f415f3484dbef03a1ea87b21..597315e76ec5f08381918a59871a25b53fcbf696 100644 (file)
@@ -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?
index f830065ffd8aba7bbe91f05af010e141edddcd42..da45779b3318a159606ad0c515799a6fe215ce1c 100644 (file)
@@ -74,7 +74,7 @@ describe "the ssh_keygen function" do
       File.stubs(:exists?).with("/tmp/a/b/c").returns(false)
       File.stubs(:exists?).with("/tmp/a/b/c.pub").returns(false)
       File.stubs(:directory?).with("/tmp/a/b").returns(false)
-      Puppet::Util.expects(:recmkdir).with("/tmp/a/b",0700)
+      FileUtils.expects(:mkdir_p).with("/tmp/a/b", :mode => 0700)
       Puppet::Util.expects(:execute).returns("")
       result = @scope.function_ssh_keygen('/tmp/a/b/c')
       result.length.should == 2
index 6b474d7bd52dffcad0dffe0baf8d171520f2566d..fd5bb17d8643416beb85a6984ef6486c1255d599 100644 (file)
@@ -95,7 +95,7 @@ AllowTcpForwarding <%= scope.lookupvar('sshd::tcp_forwarding') %>
 X11Forwarding <%= scope.lookupvar('sshd::x11_forwarding') %>
 #X11DisplayOffset 10
 #X11UseLocalhost yes
-PrintMotd <%= sshd_print_motd %>
+PrintMotd <%= scope.lookupvar('sshd::sshd_print_motd') %>
 #PrintLastLog yes
 #TCPKeepAlive yes
 #UseLogin no