]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Support spaces in mount_nfs (#1109933)
authorBrian C. Lane <bcl@redhat.com>
Thu, 21 Aug 2014 18:31:51 +0000 (11:31 -0700)
committerHarald Hoyer <harald@redhat.com>
Wed, 10 Sep 2014 09:07:44 +0000 (11:07 +0200)
nfs paths may contain spaces, make sure they are preserved when passed
to nfs_to_var and mount.

Related: rhbz#1109933

modules.d/95nfs/nfs-lib.sh

index f3caec9d0fa8dc7425df579e94ccbed67055a717..77c03d938bf8cc921008e33c9dd81344e1b64538 100755 (executable)
@@ -123,7 +123,7 @@ munge_nfs_options() {
 mount_nfs() {
     local nfsroot="$1" mntdir="$2" netif="$3"
     local nfs="" server="" path="" options=""
-    nfs_to_var $nfsroot $netif
+    nfs_to_var "$nfsroot" $netif
     munge_nfs_options
     if [ "$nfs" = "nfs4" ]; then
         options=$options${nfslock:+,$nfslock}
@@ -134,5 +134,5 @@ mount_nfs() {
             && warn "Locks unsupported on NFSv{2,3}, using nolock" 1>&2
         options=$options,nolock
     fi
-    mount -t $nfs -o$options $server:$path $mntdir
+    mount -t $nfs -o$options "$server:$path" "$mntdir"
 }