mkdumprd: drop mountaddr/mountproto nfs mount options

nfs service will append extra mount options to kernel mount options.
Such as mountaddr/mountproto options. These options only represent
current mounting details of the 1st kernel, but may not appropriate
for the 2nd kernel for the same reason as commit
d4f04afa47 ("mkdumprd: drop some nfs
		mount options when reading from kernel"). This patch will remove
these options.

Signed-off-by: Tao Liu <ltao@redhat.com>
Acked-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Tao Liu 2021-10-26 22:03:28 +08:00 committed by Coiby Xu
parent 294c965ca3
commit 727251e52e
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ to_mount()
if [[ $_fstype == "nfs"* ]]; then
_pdev=$_target
_sed_cmd+='s/,addr=[^,]*//;'
_sed_cmd+='s/,proto=[^,]*//;'
_sed_cmd+='s/,\(mount\)\?addr=[^,]*//g;'
_sed_cmd+='s/,\(mount\)\?proto=[^,]*//g;'
_sed_cmd+='s/,clientaddr=[^,]*//;'
else
# for non-nfs _target converting to use udev persistent name