Remove adjust_bind_mount_path call
If user configured target is used, path should be used as the absolute path within the dump target direct, and user should be fully aware of the path structure within the target device. The adjust_bind_mount_path call here make it very hard to control the behavior. Especially, if it's a cross device bind mount, this will likely create a invalid path in the target. And for atomic case, adjust_bind_mount_path call here assumes user will always pass root device as the explicitly configured dump target, which is not true. If user configured target device is used, the path is always be the absolute path inside of given target. If user don't know about the path structure in the target device, then user should either use the path based config, or carefully exam the target device before using it as a dump target. Signed-off-by: Kairui Song <kasong@redhat.com> Acked-by: Lianbo Jiang <lijiang@redhat.com>
This commit is contained in:
parent
bde4b7af3b
commit
3b09c4910d
@ -452,18 +452,6 @@ default_dump_target_install_conf()
|
||||
echo "path $_save_path" >> ${initdir}/tmp/$$-kdump.conf
|
||||
}
|
||||
|
||||
adjust_bind_mount_path()
|
||||
{
|
||||
local _save_path=$(get_save_path)
|
||||
local _mntpoint=$(get_mntpoint_from_target $1)
|
||||
local _absolute_save_path=$(get_bind_mount_source $_mntpoint$_save_path)
|
||||
|
||||
if [ $_absolute_save_path != $_save_path ]; then
|
||||
sed -i "/^path/d" ${initdir}/tmp/$$-kdump.conf
|
||||
echo "path $_absolute_save_path" >> ${initdir}/tmp/$$-kdump.conf
|
||||
fi
|
||||
}
|
||||
|
||||
#install kdump.conf and what user specifies in kdump.conf
|
||||
kdump_install_conf() {
|
||||
local _opt _val _pdev
|
||||
@ -480,7 +468,6 @@ kdump_install_conf() {
|
||||
ext[234]|xfs|btrfs|minix)
|
||||
_pdev=$(kdump_get_persistent_dev $_val)
|
||||
sed -i -e "s#^$_opt[[:space:]]\+$_val#$_opt $_pdev#" ${initdir}/tmp/$$-kdump.conf
|
||||
adjust_bind_mount_path "$_val"
|
||||
;;
|
||||
ssh|nfs)
|
||||
kdump_install_net "$_val"
|
||||
|
Loading…
Reference in New Issue
Block a user