Class: Vagrant::Hosts::Arch
- Defined in:
- lib/vagrant/hosts/arch.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Linux
distro_dispatch, #initialize, #nfs?, #nfs_cleanup
Methods included from Util::Retryable
Methods inherited from Base
detect, distro_dispatch, #initialize, load, #nfs?, #nfs_cleanup
Constructor Details
This class inherits a constructor from Vagrant::Hosts::Linux
Instance Method Details
#nfs_export(ip, folders) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/vagrant/hosts/arch.rb', line 4 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 |