done
}
+zfs_devs() {
+ local _mp="$1"
+ zpool list -H -v -P "${_mp%%/*}" | awk -F$'\t' '$2 ~ /^\// {print $2}' \
+ | while read -r _dev; do
+ realpath "${_dev}"
+ done
+}
+
iface_for_remote_addr() {
# shellcheck disable=SC2046
set -- $(ip -o route get to "$1")
push_host_devs "$i"
done
done
+ elif [[ $3 == zfs ]]; then
+ for mp in $(zfs_devs "$1"); do
+ push_host_devs "$mp"
+ done
fi
push_host_devs "$dev"
host_fs_types["$dev"]="$3"
[[ $mp == "/" ]] && root_devs+=("$i")
push_host_devs "$i"
done
+ elif [[ $(find_mp_fstype "$mp") == zfs ]]; then
+ for i in $(zfs_devs "$(findmnt -n -o SOURCE "$mp")"); do
+ [[ $mp == "/" ]] && root_devs+=("$i")
+ push_host_devs "$i"
+ done
fi
+
done
# TODO - with sysroot, /proc/swaps is not relevant
for i in $(btrfs_devs "$_m"); do
push_host_devs "$i"
done
+ elif [[ $_t == zfs ]]; then
+ for i in $(zfs_devs "$_d"); do
+ push_host_devs "$i"
+ done
fi
done < "$dracutsysrootdir"/etc/fstab
fi
msdos)
return 1
;;
+ zfs)
+ return 1
+ ;;
btrfs)
freeze_ok_for_btrfs "$outfile"
;;
printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")"
fi
_fstype="$(find_mp_fstype /)"
+ if [[ ${_fstype} == "zfs" ]]; then
+ local _root_ds
+ _root_ds="$(findmnt -n -o SOURCE /)"
+ printf " root=zfs:%s" "${_root_ds// /+}"
+ fi
_flags="$(find_mp_fsopts /)"
if [ -n "$_fstype" ]; then
printf " rootfstype=%s" "$_fstype"