diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a98ea467..0a3415c70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Hostname is set before networks are setup to avoid very slow `sudo` speeds on CentOS. [GH-922] - Fix typo in setting host name for Gentoo guests. [GH-931] + - `config.ssh.shell` now includes the flags to pass to it, such as `-l` [GH-917] ## 1.0.3 (May 1, 2012) diff --git a/config/default.rb b/config/default.rb index f0a877c79..8a50b7e7b 100644 --- a/config/default.rb +++ b/config/default.rb @@ -10,7 +10,7 @@ Vagrant.configure("1") do |config| config.ssh.timeout = 10 config.ssh.forward_agent = false config.ssh.forward_x11 = false - config.ssh.shell = "bash" + config.ssh.shell = "bash -l" config.vm.auto_port_range = (2200..2250) config.vm.box_url = nil diff --git a/lib/vagrant/communication/ssh.rb b/lib/vagrant/communication/ssh.rb index 1ebcdf66d..a1495ebf7 100644 --- a/lib/vagrant/communication/ssh.rb +++ b/lib/vagrant/communication/ssh.rb @@ -172,8 +172,7 @@ module Vagrant # Determine the shell to execute. If we are using `sudo` then we # need to wrap the shell in a `sudo` call. - shell = "#{@vm.config.ssh.shell} -l" - shell = "sudo -H #{shell}" if sudo + shell = "sudo -H #{@vm.config.ssh.shell}" if sudo # Open the channel so we can execute or command channel = connection.open_channel do |ch|