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
3ce85b5e60
commit
627f5117a3
|
@ -878,7 +878,9 @@ mountroot()
|
|||
pool="$("${ZPOOL}" get name,guid -o name,value -H | \
|
||||
awk -v pool="${ZFS_RPOOL}" '$2 == pool { print $1 }')"
|
||||
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}"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue