config.ssh.shell now contains full shell command

Before, it only contained the shell executable and "-l" was magically
appended to it. However, every shell doesn't support "-l" and maybe "-l"
isn't even the behavior that users want!

Therefore, the config.ssh.shell command must now contain the full
command to execute.
This commit is contained in:
Mitchell Hashimoto 2012-05-23 15:30:16 -07:00
parent 8846a19c70
commit d5a7ca6159
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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

View File

@ -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|