Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions dracut/99kdumpbase/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,15 @@ remove_sysctl_conf() {
rm -rf "${initdir}/usr/lib/sysctl.d"
}

# Removes unwanted udev rules from the initramfs image.
remove_udev_rules() {
# Exclude 90-vpdupdate.rules on ppc64le as VPD updates are not needed
# in the capture kernel.
if [[ "$(uname -m)" == "ppc64le" ]]; then
rm -f "${initdir}/etc/udev/rules.d/90-vpdupdate.rules"
fi
Comment on lines +791 to +793

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The 90-vpdupdate.rules file is typically a system-provided rule (e.g., from the ppc64-diag package) and is usually located in /usr/lib/udev/rules.d/. Removing it only from /etc/udev/rules.d/ will not prevent the rule from executing if it exists in the vendor rules directory. To ensure the rule is effectively excluded from the initramfs, it should be removed from both /etc/udev/rules.d/ and /usr/lib/udev/rules.d/, similar to the approach taken in remove_sysctl_conf.

Suggested change
if [[ "$(uname -m)" == "ppc64le" ]]; then
rm -f "${initdir}/etc/udev/rules.d/90-vpdupdate.rules"
fi
if [[ "$(uname -m)" == "ppc64le" ]]; then
rm -f "${initdir}/etc/udev/rules.d/90-vpdupdate.rules"
rm -f "${initdir}/usr/lib/udev/rules.d/90-vpdupdate.rules"
fi

}

kdump_iscsi_get_rec_val() {

local result
Expand Down Expand Up @@ -1170,6 +1179,7 @@ install() {
kdump_module_init
kdump_install_conf
remove_sysctl_conf
remove_udev_rules

if is_ssh_dump_target; then
kdump_install_random_seed
Expand Down
Loading