[PATCH] Moved the NFS nolock option into Payload._setupNFS
David Shea
dshea at redhat.com
Tue Oct 1 19:16:25 UTC 2013
Most callers of parseNfsUrl discard the options value. All anaconda NFS
repos are either mounted through _setupNFS or are mounted by dracut
which has its own nolock handling.
---
pyanaconda/iutil.py | 5 -----
pyanaconda/packaging/__init__.py | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ad09208..ff7d32b 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -326,11 +326,6 @@ def parseNfsUrl(nfsurl):
else:
host = s[0]
- if not options:
- options = "nolock"
- elif "nolock" not in options:
- options += ",nolock"
-
return (options, host, path)
def add_po_path(module, directory):
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 48d4cbd..7b602ab 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -521,6 +521,11 @@ class Payload(object):
# mount the specified directory
url = "%s:%s" % (server, path)
+ if not options:
+ options = "nolock"
+ elif "nolock" not in options:
+ options += ",nolock"
+
try:
blivet.util.mount(url, mountpoint, fstype="nfs", options=options)
except OSError as e:
--
1.8.3.1
More information about the anaconda-patches
mailing list