[PATCH] Moved the NFS nolock option into Payload._setupNFS

Brian C. Lane bcl at redhat.com
Tue Oct 1 19:41:43 UTC 2013


On Tue, Oct 01, 2013 at 03:16:25PM -0400, David Shea wrote:
> 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

Ack
-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20131001/2e593ba3/attachment-0001.sig>


More information about the anaconda-patches mailing list