forked from hashicorp/vagrant
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Arch Linux as under vagrant/hosts
Added NFS support for Arch Linux under vagrant/hosts by adding vagrant/hosts/arch and a platform test for Arch Linux.
- Loading branch information
Showing
5 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Vagrant | ||
module Hosts | ||
class Arch < Linux | ||
def nfs_export(ip, folders) | ||
output = TemplateRenderer.render('nfs/exports_linux', | ||
:uuid => env.vm.uuid, | ||
:ip => ip, | ||
:folders => folders) | ||
|
||
env.ui.info I18n.t("vagrant.hosts.arch.nfs_export.prepare") | ||
sleep 0.5 | ||
|
||
output.split("\n").each do |line| | ||
# This should only ask for administrative permission once, even | ||
# though its executed in multiple subshells. | ||
system(%Q[sudo su root -c "echo '#{line}' >> /etc/exports"]) | ||
end | ||
|
||
# We run restart here instead of "update" just in case nfsd | ||
# is not starting | ||
system("sudo /etc/rc.d/rpcbind restart") | ||
system("sudo /etc/rc.d/nfs-common restart") | ||
system("sudo /etc/rc.d/nfs-server restart") | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ def detect | |
classes = { | ||
:darwin => BSD, | ||
:bsd => BSD, | ||
:arch => Arch, | ||
:linux => Linux | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters