"sudo -i sh" doesn't do the right thing on Debian lenny (sudo v1.6.9). Let's try "sudo sh -l" instead.

This commit is contained in:
Mike Williams 2011-02-01 09:24:08 +11:00 committed by Mitchell Hashimoto
parent 6d6ca39795
commit 4bb8b80950
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ module Vagrant
# of `sudo`. # of `sudo`.
def sudo!(commands, options=nil, &block) def sudo!(commands, options=nil, &block)
session.open_channel do |ch| session.open_channel do |ch|
ch.exec("sudo -i sh") do |ch2, success| ch.exec("sudo sh -l") do |ch2, success|
# Output each command as if they were entered on the command line # Output each command as if they were entered on the command line
[commands].flatten.each do |command| [commands].flatten.each do |command|
ch2.send_data "#{command}\n" ch2.send_data "#{command}\n"