hashicorp / hashicorp/vagrant

config.smartos.suexec_cmd ignored when set in base Vagrantfile

Open
#9,782 0 comments 0 reactions 1 assignee Claimed by @chrisroberts View on GitHub
guest/smartos
Dominant language
Ruby
Stars
27.2k
Forks
4.4k
Avg merge
1m
Merged PRs (30d)
1

Description

I can set `config.smartos.suexec_cmd` manually in a downstream Vagrantfile, but when I set this in the base box, Vagrant strangely ignores this and uses the dumb `pfexec` default.

### Vagrant version

Vagrant 2.0.2

### Host operating system

macOS 10.13 High Sierra

### Guest operating system

Haiku nightly hrev hrev51909, using SmartOS Vagrant guest plugin to work around some issues with the Haiku Vagrant plugin

### Vagrantfile (packed into base box by Packer)
```ruby
Vagrant.configure("2") do |config|
config.vm.guest = :smartos
config.ssh.username = "user"
config.smartos.suexec_cmd = "/boot/system/non-packaged/bin/boynamedsu"

config.vm.synced_folder ".", "/boot/vagrant-src", type: "rsync", rsync__args: ["--verbose", "--archive", "--delete", "-zz", "--copy-links"]
end
```

### Expected behavior

On `vagrant up`, the box boots normally.

### Actual behavior

Vagrant runs `pfexec` instead of `boynamedsu`, demonstrating that `config.smartos.suexec_cmd` is ignored.

As a workaround, one can copy and paste `config.smartos.suexec_cmd = "/boot/system/non-packaged/bin/boynamedsu"` into the downstream `Vagrantfile`, though this is tedious. I am planning to work around this behavior by shimming `pfexec` in the base box, so that the default value can resolve to something useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.