Use proper nfsd binary on Fedora [closes GH-450]
This commit is contained in:
parent
1c2f80fab4
commit
0f0cb27e50
|
@ -1,6 +1,7 @@
|
||||||
## 0.8.6 (unreleased)
|
## 0.8.6 (unreleased)
|
||||||
|
|
||||||
- Fix issue with download progress not properly clearing the line. [GH-476]
|
- Fix issue with download progress not properly clearing the line. [GH-476]
|
||||||
|
- NFS should work properly on Fedora. [GH-450]
|
||||||
|
|
||||||
## 0.8.5 (August 15, 2011)
|
## 0.8.5 (August 15, 2011)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
module Vagrant
|
module Vagrant
|
||||||
module Hosts
|
module Hosts
|
||||||
autoload :Base, 'vagrant/hosts/base'
|
autoload :Base, 'vagrant/hosts/base'
|
||||||
autoload :BSD, 'vagrant/hosts/bsd'
|
|
||||||
autoload :Linux, 'vagrant/hosts/linux'
|
|
||||||
autoload :Arch, 'vagrant/hosts/arch'
|
autoload :Arch, 'vagrant/hosts/arch'
|
||||||
|
autoload :BSD, 'vagrant/hosts/bsd'
|
||||||
|
autoload :Fedora, 'vagrant/hosts/fedora'
|
||||||
|
autoload :Linux, 'vagrant/hosts/linux'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
module Vagrant
|
||||||
|
module Hosts
|
||||||
|
class Fedora < Linux
|
||||||
|
def initialize(*args)
|
||||||
|
super
|
||||||
|
|
||||||
|
@nfs_server_binary = "/etc/init.d/nfs"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,9 +10,23 @@ module Vagrant
|
||||||
def self.distro_dispatch
|
def self.distro_dispatch
|
||||||
return nil if !Util::Platform.linux?
|
return nil if !Util::Platform.linux?
|
||||||
return Arch if File.exist?("/etc/rc.conf") && File.exist?("/etc/pacman.conf")
|
return Arch if File.exist?("/etc/rc.conf") && File.exist?("/etc/pacman.conf")
|
||||||
|
|
||||||
|
if File.exist?("/etc/redhat-version")
|
||||||
|
# Check if we have a known redhat release
|
||||||
|
File.open("/etc/redhat-version") do |f|
|
||||||
|
return Fedora if f.gets =~ /^Fedora/
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def initialize(*args)
|
||||||
|
super
|
||||||
|
|
||||||
|
@nfs_server_binary = "/etc/init.d/nfs-kernel-server"
|
||||||
|
end
|
||||||
|
|
||||||
def nfs?
|
def nfs?
|
||||||
retryable(:tries => 10, :on => TypeError) do
|
retryable(:tries => 10, :on => TypeError) do
|
||||||
# Check procfs to see if NFSd is a supported filesystem
|
# Check procfs to see if NFSd is a supported filesystem
|
||||||
|
@ -37,7 +51,7 @@ module Vagrant
|
||||||
|
|
||||||
# We run restart here instead of "update" just in case nfsd
|
# We run restart here instead of "update" just in case nfsd
|
||||||
# is not starting
|
# is not starting
|
||||||
system("sudo /etc/init.d/nfs-kernel-server restart")
|
system("sudo #{@nfs_server_binary} restart")
|
||||||
end
|
end
|
||||||
|
|
||||||
def nfs_cleanup
|
def nfs_cleanup
|
||||||
|
|
Loading…
Reference in New Issue