mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
If $ZFS_BOOTFS contains guid, replace the guid portion with $pool
Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Richard Laager <rlaager@wiktel.com> Signed-off-by: Garrett Fields <ghfields@gmail.com> Closes #8356
This commit is contained in:
parent
35050ef39e
commit
9fd95a2f1b
@ -878,7 +878,9 @@ mountroot()
|
|||||||
pool="$("${ZPOOL}" get name,guid -o name,value -H | \
|
pool="$("${ZPOOL}" get name,guid -o name,value -H | \
|
||||||
awk -v pool="${ZFS_RPOOL}" '$2 == pool { print $1 }')"
|
awk -v pool="${ZFS_RPOOL}" '$2 == pool { print $1 }')"
|
||||||
if [ -n "$pool" ]; then
|
if [ -n "$pool" ]; then
|
||||||
ZFS_BOOTFS="${pool}/${ZFS_BOOTFS#*/}"
|
# If $ZFS_BOOTFS contains guid, replace the guid portion with $pool
|
||||||
|
ZFS_BOOTFS=$(echo "$ZFS_BOOTFS" | \
|
||||||
|
sed -e "s/$("${ZPOOL}" get guid -o value "$pool" -H)/$pool/g")
|
||||||
ZFS_RPOOL="${pool}"
|
ZFS_RPOOL="${pool}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user