summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2013-11-01 15:54:57 +0000
committergjb <gjb@FreeBSD.org>2013-11-01 15:54:57 +0000
commit8141a12b1dd663deb4a5f3e46f436ecd7953a5c7 (patch)
treea541c42afaaef18a8c4236933c0452a2c304da1d /usr.sbin
parent7933da6e9aa7e2b125493a74c863397987681991 (diff)
downloadFreeBSD-src-8141a12b1dd663deb4a5f3e46f436ecd7953a5c7.zip
FreeBSD-src-8141a12b1dd663deb4a5f3e46f436ecd7953a5c7.tar.gz
MFC r256540, r256544:
r256540 (dteske): Add loader.conf(5) entries to import bootpool after boot when using full-disk encryption and ZFS. r256544 (dteske): Fix loader.conf(5) entries from r256540. Approved by: re (hrs) Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin')
-rwxr-xr-xusr.sbin/bsdinstall/scripts/zfsboot10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot
index 715ea31..4d14e22 100755
--- a/usr.sbin/bsdinstall/scripts/zfsboot
+++ b/usr.sbin/bsdinstall/scripts/zfsboot
@@ -802,7 +802,7 @@ zfs_create_boot()
zpool set cachefile=$BSDINSTALL_CHROOT/boot/zfs/zpool.cache \
"$poolname" || return $FAILURE
- # Last, but not least... add required lines to rc.conf(5)
+ # Last, but not least... required lines for rc.conf(5)/loader.conf(5)
# NOTE: We later concatenate these into their destination
echo 'zfs_enable="YES"' > $BSDINSTALL_TMPETC/rc.conf.zfs ||
return $FAILURE
@@ -812,6 +812,14 @@ zfs_create_boot()
# We're all done unless we should go on to do encryption
[ "$ZFSBOOT_GELI_ENCRYPTION" ] || return $SUCCESS
+ # Some additional GELI requirements for loader.conf(5)
+ echo 'zpool_cache_load="YES"' \
+ >> $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE
+ echo 'zpool_cache_type="/boot/zfs/zpool.cache"' \
+ >> $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE
+ echo 'zpool_cache_name="/boot/zfs/zpool.cache"' \
+ >> $BSDINSTALL_TMPBOOT/loader.conf.zfs || return $FAILURE
+
#
# Configure geli(8)-based encryption
#
OpenPOWER on IntegriCloud