Skip to content

Commit

Permalink
Merge pull request #27 from jdeppe-pivotal/master
Browse files Browse the repository at this point in the history
Set default mode to uploaded configuration files
  • Loading branch information
tmatilai committed Sep 26, 2013
2 parents e40244d + 6d25de4 commit 73d569d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/vagrant-proxyconf/action/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def write_config(machine, config, opts = {})
machine.communicate.tap do |comm|
tmp = "/tmp/vagrant-proxyconf"
comm.upload(temp.path, tmp)
comm.sudo("chmod #{opts[:mode]} #{tmp}") if opts[:mode]
mode = opts[:mode] || '0644'
comm.sudo("chmod #{mode} #{tmp}")
comm.sudo("chown root:root #{tmp}")
comm.sudo("mkdir -p #{File.dirname(path)}")
comm.sudo("mv #{tmp} #{path}")
Expand Down

0 comments on commit 73d569d

Please sign in to comment.