Skip to content

Commit

Permalink
Merge pull request #763 from harish-24/nfs_ubuntu
Browse files Browse the repository at this point in the history
Fix nfs.py: nfs-server for Ubuntu nfs service
  • Loading branch information
Xu Tian authored Nov 11, 2016
2 parents 86d9bbc + 36c406d commit e3220d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion virttest/nfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from avocado.utils import path
from avocado.utils import process
from avocado.utils import distro
from avocado.core import exceptions

from . import utils_misc
Expand Down Expand Up @@ -152,12 +153,16 @@ def __init__(self, params):
path.find_command("mount")
self.mk_mount_dir = False
self.unexportfs_in_clean = False
distro_details = distro.detect()

if params.get("setup_local_nfs") == "yes":
self.nfs_setup = True
path.find_command("service")
path.find_command("exportfs")
self.nfs_service = service.Factory.create_service("nfs")
if distro_details.name == 'Ubuntu':
self.nfs_service = service.Factory.create_service("nfs-server")
else:
self.nfs_service = service.Factory.create_service("nfs")
self.rpcbind_service = service.Factory.create_service("rpcbind")

self.export_dir = (params.get("export_dir") or
Expand Down

0 comments on commit e3220d7

Please sign in to comment.