kdumpctl: skip selinux-relabel for dracut_args --mount dump target
When using "dracut_args --mount" to specify dump target, e.g. nfs like: path / core_collector makedumpfile -d 31 dracut_args --mount "host:/path /var/crash nfs defaults" kdump service should neither guarantees the correctness, nor relabels it. For current code, since dracut_args dump targets are likely not mounted so kdump service mistakenly relabel the rootfs, which is meanless and takes very long time. Signed-off-by: Pingfan Liu <piliu@redhat.com>
This commit is contained in:
parent
85156bfc66
commit
cde5944f93
3
kdumpctl
3
kdumpctl
@ -946,6 +946,9 @@ path_to_be_relabeled()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if is_mount_in_dracut_args; then
|
||||||
|
return;
|
||||||
|
fi
|
||||||
_path=$(get_save_path)
|
_path=$(get_save_path)
|
||||||
# if $_path is masked by other mount, we will not relabel it.
|
# if $_path is masked by other mount, we will not relabel it.
|
||||||
_rmnt=$(df $_mnt/$_path 2>/dev/null | tail -1 | awk '{ print $NF }')
|
_rmnt=$(df $_mnt/$_path 2>/dev/null | tail -1 | awk '{ print $NF }')
|
||||||
|
Loading…
Reference in New Issue
Block a user