Commit Graph

91 Commits

Author SHA1 Message Date
Mitchell Hashimoto 864328e0b1 Merge pull request #4224 from kamazee/fix/master/nfs_archlinux_systemd
hosts/arch: Fix NFS server starting/stopping and status check
2014-08-05 17:46:40 -07:00
Alexander Kurilo d2b65a9efa Fix NFS server running and status check
According to https://wiki.archlinux.org/index.php/NFS#Starting_the_server
2014-07-22 16:47:12 +03:00
Steven Leung 1fc36d2d3a Redhat 7 to use systemd as well …
Change nfs plugin to detect distribution and version

Fixes issue #4227
2014-07-21 10:56:06 -07:00
StefanScherer 1b32cbade2 fixed writing rdp file 2014-06-03 06:57:14 +02:00
Mitchell Hashimoto 43f347a737 hosts/windows: RDP cap shouldn't remove tempfile [GH-3875] 2014-05-22 10:20:45 -07:00
Kalman Hazins bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto 01a8e50235 hosts/windows: use subprocess to execute mstsc [GH-3837] 2014-05-20 20:47:32 -07:00
Mitchell Hashimoto f369c13e25 hosts/linux: niceer error if rdesktop not found 2014-05-20 19:58:12 -07:00
Mitchell Hashimoto 2da21e3578 hosts/linux: rdp_client cap [GH-3845] 2014-05-20 19:55:36 -07:00
Mitchell Hashimoto e1815a13e8 commands/rdp: support extra args to RDP client [GH-3686] 2014-05-07 18:32:20 -07:00
Jon Topper 6ec9e3e279 Linux stuff now tested and working! 2014-05-06 12:24:35 +01:00
Jon Topper 4a4ca74dea Added missing 'sudo' call. 2014-05-06 10:05:53 +01:00
Jon Topper 0da334156b Fix up the Linux host too 2014-05-05 23:56:39 +01:00
Jon Topper e5490544d6 Use 'tee' to write to /etc/exports 2014-05-05 23:55:16 +01:00
Mitchell Hashimoto ec57a286cd hosts/darwin: use a temp dir since Tempfile is deleted right away 2014-04-21 13:56:43 -07:00
Mitchell Hashimoto b0b445fcac hosts/darwin: rdp client support by subprocessing `open` 2014-04-21 13:56:40 -07:00
Mitchell Hashimoto 7c8053cb2b hosts/windows: don't remove the rdp file, race condition 2014-04-21 13:54:21 -07:00
Mitchell Hashimoto 8698ebeff6 hosts/windows: use the port when connecting 2014-04-21 13:54:18 -07:00
Mitchell Hashimoto 76a7c63f8b guests/windows: detect the port for RDP 2014-04-21 13:54:15 -07:00
Mitchell Hashimoto 746b568176 hosts/windows: rdp_client cap 2014-04-21 13:54:10 -07:00
Kevin Carmody 17c171559f Update nfs.rb
Make call to exportfs just use the system path.
2014-03-22 21:07:45 +00:00
Russell Jackson a3c94ab910 Fix Linux NFS exports pruning due to bad `sed` expression
The mount id is a file path which will contain forward slashes. A
previous attempt (although notably missing in the Linux host plugin) at
fixing this used `String.gsub` to escape the forward slashes; however,
the solution that eventually made its way into the 1.5 release uses
`Regexp.escape` which doesn't escape forward slashes.

The Ruby `Regexp.escape` method does not escape forward slashes because
they are not RE meta-characters; their special meaning is specific to
sed expressions as delimiters. To avoid the issue entirely, we can use
an alternative delimiter by prefixing the address expression with a
backslash with the desired delimiter character following.

Use control character (ASCII code point `0x01`) as expression delimiter
so it is very unlikely an identifier will have a conflicting character
within it.
2014-03-12 12:25:53 -07:00
Mitchell Hashimoto d14f3e0a56 hosts/bsd: make directories unique when exporting 2014-02-26 08:04:21 -08:00
Mitchell Hashimoto 7abcea35b8 hosts/linux: escape regular expression for prune NFS exports [GH-2934] 2014-02-24 07:51:06 -08:00
Jon Topper 7b30e557cd hosts/bsd: sort NFS exports to avoid false validation errors [GH-2927]
With a synced folder configuration like so:

 synced_folder ".", "/vagrant", :nfs => true
 synced_folder "#{ENV['HOME']}/mirror", "/mirror", :nfs => true
 synced_folder ENV['HOME'], "/home/#{ENV['USER']}", :nfs => true

on OSX, vagrant writes two overlapping exports to /etc/exports
which then fail the export check.

Iterating through the list of folders lexically builds a correct, single
exports entry.

Signed-off-by: Teemu Matilainen <teemu.matilainen@iki.fi>
2014-02-21 23:43:11 -03:00
Mitchell Hashimoto b89a47c955 hosts/opensuse: start NFS server properly [GH-2923] 2014-02-03 12:18:09 +01:00
Mitchell Hashimoto 7e9ea7c1c6 hosts/redhat: recognize Korora [GH-2869] 2014-01-21 09:50:20 -08:00
Mitchell Hashimoto fbd8cfc628 hosts/gentoo: more robust check for systemctl path on Gentoo 2014-01-18 11:03:46 -08:00
Tim Gus f0ec355a33 hosts/gentoo: fix nonstandard path to systemctl command 2014-01-18 00:13:54 -05:00
BlackEagle b30eacf94f nfs_apply :: exportfs sometimes leaves exports behind
On my machine i had a case where /etc/exports was updated but the old
exports were still there. This was leading to
"exportfs: duplicated export entries" and eventually leading to nfs
being not available for the box.

changing the command exportfs -r to exportfs -ar seems to address this
issue.

Signed-off-by: BlackEagle <ike.devolder@gmail.com>
2014-01-17 10:54:17 +01:00
Gustavo Gama 262e2c0192 Fix typo 2014-01-15 09:40:41 -02:00
Mitchell Hashimoto 9b383740ba hosts/bsd: use Util::Which instead of system("which") 2014-01-12 22:37:39 -08:00
Mitchell Hashimoto b8601423c7 hosts/bsd: don't execute shell for sudo commands [GH-2808] 2014-01-12 22:34:45 -08:00
Mitchell Hashimoto e9f6c81ab7 hosts/*: proper detect API 2014-01-07 21:18:36 -08:00
Mitchell Hashimoto 26b564566b hosts/null: needs to accept env as param 2014-01-07 21:14:33 -08:00
Mitchell Hashimoto a72e7473d5 hosts/windows: convert 2014-01-07 21:13:21 -08:00
Mitchell Hashimoto 4d47dae5b9 many more hosts converted 2014-01-07 21:11:59 -08:00
Mitchell Hashimoto 4cec8b48d9 hosts/freebsd: convert 2014-01-07 21:01:03 -08:00
Mitchell Hashimoto a6c7cc481e convert more hosts: arch and linux 2014-01-07 20:53:39 -08:00
Mitchell Hashimoto bdb88da743 hosts/bsd: convert to new style 2014-01-07 20:39:24 -08:00
Mitchell Hashimoto 5e490e3746 Get tests to pass 2014-01-07 19:26:03 -08:00
Mitchell Hashimoto 2cf864e95b hosts/bsd: check exports only if exports file exists [GH-2714] 2013-12-28 13:48:13 -07:00
Mitchell Hashimoto 2bebf188d6 hosts/bsd: check for exports file issues prior to exporting NFS 2013-12-13 22:14:13 -08:00
Mitchell Hashimoto 05e9dc6e59 Update CHANGELOG 2013-11-23 11:36:20 -08:00
Mitchell Hashimoto 52c27cd498 Merge pull request #2448 from rimckenn/patch-1
hosts/bsd: don't set both maproot and mapall
2013-11-23 11:34:27 -08:00
Rudolf Leermakers aa749db079 Restart NFS on Gentoo host instead of starting
In the case that NFS is already started on a Gentoo host, /etc/init.d/nfs start will not reload exports, but fail. /etc/init.d/nfs reload is known to fail for some esoteric configurations of /etc/exports, restart should be safe for existing connections.
2013-11-11 12:30:40 +01:00
rimckenn 3047b81256 Update host.rb
mapall= and maproot= are mutually exclusive options. Currently, when trying to use maproot=, mapall= is getting automatically added, which prevents us from using the NFS mount. This change turns off the adding of mapall= if maproot= has been specified as an option.
2013-11-01 14:44:49 +00:00
Mitchell Hashimoto 673a06b54d hosts/gentoo: use subprocess machinery
/cc @timgus
2013-10-17 08:32:09 -10:00
Tim Gus 7bfc3ea16e hosts/gentoo: recognize systemd for nfsd startup and
replace "service" command with /etc/init.d/nfs
2013-10-17 11:11:59 -04:00
Matthew e9903422cc detect Red Hat Enterprise Linux 4 and Oracle Linux 2013-10-05 18:01:27 +01:00