If rootfs has a mountpoint other than /, strip it from it and any child datasets when mounting at /new_root.

pull/106/head
Marisa Kirisame 8 years ago
parent 060f140489
commit bf8c238f0e
  1. 3
      src/zfs-utils/zfs-utils.initcpio.hook

@ -53,6 +53,7 @@ zfs_mount_handler () {
fi
local node="$1"
local rootmnt=$(zfs get -H -o value mountpoint "${ZFS_DATASET}")
local tab_file="${node}/etc/fstab"
local zfs_datasets="$(zfs list -H -o name -t filesystem -r ${ZFS_DATASET})"
@ -73,7 +74,7 @@ zfs_mount_handler () {
fi
;;
*)
mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}${mountpoint}"
mount -t zfs -o "zfsutil,${rwopt_exp}" "${dataset}" "${node}${mountpoint##${rootmnt}}"
;;
esac
done

Loading…
Cancel
Save