Skip to contentSkip to conversation

Support spaces in mount_nfs (#1109933)

PATCH In review Brian C. Lane 2 participants 2 messages Aug 21, 2014 – Sep 10, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support spaces in mount_nfs (#1109933)

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
modules.d/95nfs/nfs-lib.sh +2 -2
index d5377fe..94d05b8 100755
@@ -125,7 +125,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}
@@ -136,5 +136,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"
 }
Signature · 1 line
1.9.3

A message that is not in the archive (sent off-list or not yet received): 1408645911-3268-1-git-send-email-bcl-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#2 lore raw
Quoted 23 lines · Brian C. Lane

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
modules.d/95nfs/nfs-lib.sh +1 -1
index d5377fe..94d05b8 100755
@@ -125,7 +125,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}

modules.d/95nfs/nfs-lib.sh mount_nfs() { · line 140

Quoted 6 lines
modules.d/95nfs/nfs-lib.sh +1 -1
@@ -136,5 +136,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"
 }

Thanks! pushed