From 4bb8b80950a9d29525c01d8a08693bfbee386a00 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Tue, 1 Feb 2011 09:24:08 +1100 Subject: [PATCH] "sudo -i sh" doesn't do the right thing on Debian lenny (sudo v1.6.9). Let's try "sudo sh -l" instead. --- lib/vagrant/ssh/session.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant/ssh/session.rb b/lib/vagrant/ssh/session.rb index 022c427a2..6c63a8c3e 100644 --- a/lib/vagrant/ssh/session.rb +++ b/lib/vagrant/ssh/session.rb @@ -32,7 +32,7 @@ module Vagrant # of `sudo`. def sudo!(commands, options=nil, &block) 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 [commands].flatten.each do |command| ch2.send_data "#{command}\n"