mitchellh/vagrant — pull request #1140 by smerrill (2012-09-18 20:22:00+00:00)
Title: Add Fedora 17+ NFS support.

Here's a quick-and-dirty pull request to add NFS support to Fedora 17 and up, as reported in #1125.

This simply parses the redhat-release file, and if the version of Fedora is 17 or greater, it changes @nfs_server_binary to `/usr/sbin/service nfs-server` instead of `/etc/init.d/nfs`, which does not exist any more in Fedora 17+ due to the switch to systemd.

This works because the `service` command in Fedora 17 will rewrite `service nfs-server restart` to `systemctl restart nfs-server.service` behind the scenes. This is the simplest way to solve this issue for now without changing too much code since `lib/vagrant/hosts/linux.rb` calls
```ruby
system("sudo #{@nfs_server_binary} restart")
```
at the end of nfs_export, whereas calling systemctl would require copying that method and just changing the last line.