dracut: skip zfsexpandknoweldge when zfs_devs is present in dracut

PR 1711 (https://github.com/dracutdevs/dracut/pull/1711) adds a zfs_devs
function to dracut to detect the physical devices backing zfs pools. If
this function exists in the version of dracut this module is being
called from, then it does not need to run.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Savyasachee Jha <hi@savyasacheejha.com>
Closes #13121
This commit is contained in:
Savyasachee Jha 2022-03-01 04:05:25 +05:30 committed by Brian Behlendorf
parent 21bd766133
commit 8f7826f73b
1 changed files with 6 additions and 0 deletions

View File

@ -57,6 +57,12 @@ array_contains () {
}
check() {
# https://github.com/dracutdevs/dracut/pull/1711 provides a zfs_devs
# function to detect the physical devices backing zfs pools. If this
# function exists in the version of dracut this module is being called
# from, then it does not need to run.
type zfs_devs >/dev/null 2>&1 && return 1
local mp
local dev
local blockdevs