Brian Cain
0ac26be4ef
( #8917 ) Fix shell_expand_guest_path capability
...
Prior to this commit, when the guest capability attempted to expand a
path with spaces it would quote the path passed in. However if the path
also had a relative path those quotes would end up making `printf`
ignore it and not properly expand the path fully. This commit updates
that to first escape the quotes of a path and then pass in the new path
to be expanded.
2017-08-25 10:02:36 -07:00
Brian Cain
2b8f7f67ea
Add unit tests for shell_expand_guest_path function
2017-08-15 09:33:29 -07:00
Brian Cain
61c501cc65
Ensure paths with spaces are preserved
...
Prior to this commit, if a user set the `destination` path to include a
space, the `shell_expand_guest_path` function would remove that space
and return a partial path. This commit updates that to quote the path to
be expanded to preserve the entire path.
2017-08-14 15:34:10 -07:00
Chris Roberts
414184b76b
guests/rhel: Update network configuration
...
Properly detects NetworkManager on guest as well as devices controlled
by NetworkManager. Provides configuration option to enable/disbale
NetworkManager control on devices.
2017-04-26 13:15:33 -07:00
Chris Roberts
98b0ad1464
Fix linux guest mount smb capability
2017-03-24 13:42:51 -07:00
Chris Roberts
dbf01572ef
Merge pull request #8122 from chrisroberts/virtualbox/uid-gid
...
Use uid/gid from mount_options if provided for synced folders.
2017-03-06 14:21:11 -08:00
Chris Roberts
9f393fc1e0
Use uid/gid from mount_options if provided for synced folders.
...
This also extracts the gid/uid detection and upstart actions into
reusable module to provide consistent behavior.
2016-12-14 12:12:17 -08:00
ephemeralsnow
556b82da1c
Fix quotes
2016-12-07 18:04:33 +09:00
jklippel
b10bc2e8c2
Vagrant-Issue: 7368: redirect any output to stderr by /sbin/init to /dev/null when checking for upstart capability
2016-11-29 08:10:25 +01:00
Chris Roberts
5482692127
guests/linux: Only match interfaces without special characters
2016-11-10 07:19:26 -08:00
Chris Roberts
fb4e4320b2
Remove `set -e` usage for better shell compatibility
2016-10-24 10:30:08 -07:00
Chris Roberts
d0549d6e11
guests/linux: Provide common linux detection style
...
Defines a common and generic linux detection strategy which can be
subclassed and easily reused by providing a custom detection constant.
2016-10-11 07:50:34 -07:00
Chris Roberts
07ce1c6930
Merge pull request #7866 from chrisroberts/guest-linux/network-interfaces-sorting
...
guests/linux: Update network interface sorting implementation
2016-10-10 10:59:52 -07:00
Chris Roberts
a8970281ce
guests/linux: Properly sort interface name types
...
Add failing networking interface list sorting test with example
provided by #7883 . Update sorting logic to properly handle different
types and differing array lengths.
Fixes #7883
2016-10-10 10:22:19 -07:00
Chris Roberts
b738aaac0f
Merge pull request #7813 from rudineirk/fix-non-upstart-linux
...
Fix non upstart linux nfs mounts
2016-10-06 12:59:23 -07:00
Chris Roberts
e2b18fc65d
guests/linux: Update network interface sorting implementation
...
Always pull ordered ethernet devices to the head of the list. Ensure
aliases are not included.
2016-10-04 17:25:00 -07:00
Chris Roberts
0300df09fb
guests/linux: Update constant name, freeze constant values
2016-09-30 12:11:54 -07:00
Chris Roberts
9f468d2626
guests/linux: Place ethernet devices at start of device list
2016-09-29 15:33:29 -07:00
Rudinei Goi Roecker
8b8c961935
Fix non upstart linux nfs mounts
2016-09-20 17:57:54 -03:00
Chris Roberts
a7537a6be0
Merge pull request #7726 from chrisroberts/fix/rsync-exclude
...
Ignore files excluded from sync on chown
2016-08-19 09:58:31 -07:00
Chris Roberts
dd6ad2fbf3
guests/linux: only use effective group ID when appropriate
2016-08-17 06:53:26 -07:00
Chris Roberts
185a7dfc2e
guests/rsync do not chown files excluded from sync
2016-08-16 15:13:19 -07:00
Chris Roberts
dd91269491
guests: Prevent ssh disconnect from causing error on halt
2016-08-12 13:25:39 -07:00
Chris Roberts
ce3329e184
guests/linux: Always order discovered network interfaces
2016-08-12 10:31:41 -07:00
hendrenj
855643e9a5
s/bsd/linux/
2016-07-19 11:45:03 -06:00
hendrenj
a6760dd8e7
fixes #7610
2016-07-19 11:22:35 -06:00
Seth Vargo
7f1947fec2
folders/rsync: Shellescape guest paths
...
This allows users to have spaces or other special characters in
destination paths on the guest.
2016-07-18 21:13:00 -04:00
Seth Vargo
1c0d0b8b9d
guests/linux: Style update for choose_addressable_ip
2016-07-18 21:12:59 -04:00
Seth Vargo
e2becda89d
guests/gentoo: Use shared cap for listing network interfaces
2016-07-18 21:12:59 -04:00
Seth Vargo
7e88266999
guests/linux: Properly escape and retry vbox shared folder mounting
2016-07-18 21:12:57 -04:00
Seth Vargo
4aaa600bd6
guests/linux: Centralize public_key logic
2016-07-18 21:12:57 -04:00
Seth Vargo
627091de35
guests/linux: reorg
2016-07-18 21:12:55 -04:00
Seth Vargo
8f3b6511f2
guests/linux: Add shared cap for listing network interfaces
2016-07-18 21:12:54 -04:00
Seth Vargo
851eff1288
guests/linux: Ensure NFS retries when mounting
...
Fixes GH-7443
2016-06-19 14:34:33 -04:00
Seth Vargo
6284a9ac50
guests/bsd: Move NFS mounting logic into shared
...
A number of the BSD guests used very old mounting options or just
ignored some parameters entirely. This fixes that.
- Closes #7474
- Fixes #7466
2016-06-17 21:04:23 -04:00
Seth Vargo
b29864f450
Use symbols for defining guest capabilities
2016-06-17 19:55:04 -04:00
Seth Vargo
add40534de
Use strip instead of chomp
2016-06-16 15:32:11 -04:00
Jonathan
d1be7ae84a
Better method for string concatenation
...
Never developed in Ruby before. I have only just discovered that apparently `<<` is a better method of string concatenation.
2016-06-16 11:59:11 +01:00
Jonathan
2720ed3d2c
Apply new line before shell to system
...
Having looked at the code again this seems like a more straightforward way of fixing the bug.
2016-06-16 11:47:47 +01:00
Jonathan
f7f46ba47d
Append newline to each key added
...
The change to this file 10 days ago removed a newline character at the end of each key added to it. This mean that when another key was added, it continued on the same line as the one before and thus wasn't being detected when an ssh connection came in with a key file.
With regards to https://github.com/mitchellh/vagrant/issues/7455 this is an (ugly) fix.
I'm sure someone knows a better command to concat a file and a string and append it to the `authorized_keys` file. But this does fix the problem.
2016-06-15 23:56:22 +01:00
Seth Vargo
61d2a50a54
guests/linux: Fix compatibility with dash shell
2016-06-06 12:59:51 -04:00
Seth Vargo
337e3d79d8
guests/linux: Use require_relative in plugin
2016-06-06 11:58:33 -04:00
Seth Vargo
b643031b05
guests/linux: Do not require vagrant in guest
2016-06-06 11:58:33 -04:00
Seth Vargo
837713c2d1
guests/linux: Mount NFS in one command
2016-06-06 11:58:32 -04:00
Seth Vargo
e2b7e28082
guests/linux: Update insert_public_key cap to be one command
2016-06-06 11:58:32 -04:00
Seth Vargo
d4159e4208
guests/linux: Add tests for choosing addressable IP
2016-06-06 11:58:31 -04:00
Seth Vargo
fbd765acc1
Do not interpolate in SMB linux heredoc
...
Fixes GH-6906
2016-02-29 07:19:45 -05:00
Mitchell Hashimoto
72f60aff65
whitespace
2015-12-24 12:44:58 -08:00
Mitchell Hashimoto
601f7d41e5
synced_folders/smb: use cred files [GH-4230]
2015-11-23 11:11:50 -08:00
Mikhail Zholobov
4e4029a076
Fix permissions on "~/.ssh/authorized_keys"
2015-11-22 19:24:33 +02:00