When using pty=true, removing files using sudo may request confirmation,
which will hang the connection.
Similarly, sometimes assumptions about file existence may be wrong and
in those cases it seems better to continue on as long as the file does
not exist, so -f makes sense there, too.
https://github.com/mitchellh/vagrant/issues/4307
Fix details:
Pass network interface name to template renderer and use it
in static and dhcp templates to render /etc/rc.conf entries.
modified: plugins/guests/freebsd/cap/configure_networks.rb
modified: templates/guests/freebsd/network_dhcp.erb
modified: templates/guests/freebsd/network_static.erb
Verification scenario:
Check if /etc/rc.conf contains vtnet entries when paravirtualized
NIC devices are used in FreeBSD guest.
Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.
This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.
The default shell is "bash -l" which does not get installed by default
on FreeBSD. This change allows the plugin to override the default shell
and use a known installed shell (sh).
I don't use `activated` here because I'd really like to optimize
performance as much as possible, and loading files from disk is
generally slow. So instead of using `activated` I load the file at the
last possible moment which is when the exact class is being requested.
I don't think many people will do this outside of the core, and I'm not
too concerned.