When using a bootpool, set the cachefile property so that it gets

imported automatically upon reboot to the newly installed system.

MFC after: 1 day
This commit is contained in:
dteske 2013-12-19 06:43:52 +00:00
parent d215e77160
commit 35d79b6af9

View File

@ -1152,7 +1152,7 @@ zfs_create_boot()
fi
# While this is apparently not needed, it seems to help MBR
f_dprintf "$funcname: Configuring zpool.cache..."
f_dprintf "$funcname: Configuring zpool.cache for zroot..."
f_eval_catch $funcname mkdir "$MKDIR_P" $BSDINSTALL_CHROOT/boot/zfs ||
return $FAILURE
f_eval_catch $funcname zpool "$ZPOOL_SET" \
@ -1174,6 +1174,12 @@ zfs_create_boot()
# We're all done unless we should go on for boot pool
[ "$ZFSBOOT_BOOT_POOL" ] || return $SUCCESS
# Set cachefile for boot pool so it auto-imports at system start
f_dprintf "$funcname: Configuring zpool.cache for boot pool..."
f_eval_catch $funcname zpool "$ZPOOL_SET" \
"cachefile=\"$BSDINSTALL_CHROOT/boot/zfs/zpool.cache\"" \
"$bootpool_name" || return $FAILURE
# Some additional geli(8) requirements for loader.conf(5)
for option in \
'zpool_cache_load=\"YES\"' \