]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
url-lib/url-lib.sh:nfs_fetch_url(): pass file directory to query if nfs is already...
authorHarald Hoyer <harald@redhat.com>
Mon, 14 Mar 2016 14:55:03 +0000 (15:55 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 14 Mar 2016 14:55:03 +0000 (15:55 +0100)
Otherwise the returned mount path includes the file with the directory

https://bugzilla.redhat.com/show_bug.cgi?id=1302764

modules.d/45url-lib/url-lib.sh

index 12df9b4c8d351dc2eefe57377bc2c8f87bf4b6eb..f3d152d61e4eb9c9ab7464ab95929512febca0cd 100755 (executable)
@@ -106,7 +106,7 @@ nfs_fetch_url() {
     local filepath="${path%/*}" filename="${path##*/}" mntdir=""
 
     # skip mount if server:/filepath is already mounted
-    mntdir=$(nfs_already_mounted "$server" "$path")
+    mntdir=$(nfs_already_mounted "$server" "$filepath")
     if [ -z "$mntdir" ]; then
         local mntdir="$(mkuniqdir /run nfs_mnt)"
         mount_nfs "$nfs:$server:$filepath${options:+:$options}" "$mntdir"