diff options
author | Savyasachee Jha <savyajha@users.noreply.github.com> | 2022-03-01 04:05:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 14:35:25 -0800 |
commit | b3ab2908554b246b8c6e1adf70d43ba66f47fcdd (patch) | |
tree | b9f6539e5e01c27942e1224c95208c09d1fc3cd8 | |
parent | 9e532d17f36a7483b58d9542562982cfc4ab098b (diff) |
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
-rwxr-xr-x | contrib/dracut/02zfsexpandknowledge/module-setup.sh.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in b/contrib/dracut/02zfsexpandknowledge/module-setup.sh.in index a161fbf6f..df8df3181 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 |