mirror of
https://github.com/dracutdevs/dracut.git
synced 2024-10-26 16:25:20 +03:00
dracut-functions: add a helper to check if kernel module is available
It's like check_kernel_config, help to check if a kernel module is enabled (cover built-in or compiled module case). Signed-off-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
parent
8f56daa8c3
commit
c050190f86
@ -674,6 +674,11 @@ check_kernel_config()
|
||||
return 1
|
||||
}
|
||||
|
||||
# 0 if the kernel module is either built-in or available
|
||||
# 1 if the kernel module is not enabled
|
||||
check_kernel_module() {
|
||||
modprobe -S $kernel --dry-run $1 &>/dev/null || return 1
|
||||
}
|
||||
|
||||
# get_cpu_vendor
|
||||
# Only two values are returned: AMD or Intel
|
||||
|
Loading…
Reference in New Issue
Block a user