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
(cherry picked from commit 7e692cfd43
)
parent
e03b09212a
commit
17c1f640fa
|
@ -125,7 +125,7 @@ munge_nfs_options() {
|
||||||
mount_nfs() {
|
mount_nfs() {
|
||||||
local nfsroot="$1" mntdir="$2" netif="$3"
|
local nfsroot="$1" mntdir="$2" netif="$3"
|
||||||
local nfs="" server="" path="" options=""
|
local nfs="" server="" path="" options=""
|
||||||
nfs_to_var $nfsroot $netif
|
nfs_to_var "$nfsroot" $netif
|
||||||
munge_nfs_options
|
munge_nfs_options
|
||||||
if [ "$nfs" = "nfs4" ]; then
|
if [ "$nfs" = "nfs4" ]; then
|
||||||
options=$options${nfslock:+,$nfslock}
|
options=$options${nfslock:+,$nfslock}
|
||||||
|
@ -136,5 +136,5 @@ mount_nfs() {
|
||||||
&& warn "Locks unsupported on NFSv{2,3}, using nolock" 1>&2
|
&& warn "Locks unsupported on NFSv{2,3}, using nolock" 1>&2
|
||||||
options=$options,nolock
|
options=$options,nolock
|
||||||
fi
|
fi
|
||||||
mount -t $nfs -o$options $server:$path $mntdir
|
mount -t $nfs -o$options "$server:$path" "$mntdir"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue