Merge pull request #51226 from garethgreenaway/51195_handle_spaces_in_fstab_opts

[2018.3] Handle spaces in fstab opts, similar fix to #39593
This commit is contained in:
Gareth J. Greenaway 2019-01-18 17:30:58 -08:00 committed by GitHub
commit 8f8ebbc227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,6 +226,7 @@ def _resolve_user_group_names(opts):
if _info and _param in _info:
_id = _info[_param]
opts[ind] = _param + '=' + six.text_type(_id)
opts[ind] = opts[ind].replace('\\040', '\\ ')
return opts
@ -727,7 +728,7 @@ def set_fstab(
'name': name,
'device': device.replace('\\ ', '\\040'),
'fstype': fstype,
'opts': opts,
'opts': opts.replace('\\ ', '\\040'),
'dump': dump,
'pass_num': pass_num,
}