From b3ab2908554b246b8c6e1adf70d43ba66f47fcdd Mon Sep 17 00:00:00 2001 From: Savyasachee Jha Date: Tue, 1 Mar 2022 04:05:25 +0530 Subject: [PATCH] dracut: skip zfsexpandknoweldge when zfs_devs is present in dracut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ahelenia ZiemiaƄska Signed-off-by: Savyasachee Jha Closes #13121 --- contrib/dracut/02zfsexpandknowledge/module-setup.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in index a161fbf6f1..df8df3181f 100755 --- a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in +++ b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in @@ -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