home: hub: mkinitfs

Download patch

ref: 156b697a87a92a18e58e29466931b4b102654dc7
parent: 59204d36985de5ba2444d5f3e0d50a119287ec51
author: Ben Hoskings <ben@hoskings.net>
date: Tue Sep 29 14:48:21 CDT 2020

Fix typo in prepare_zfs_root().

This typo causes $_root_pool to be an empty string, which causes the
subsequent `zpool list` to output encryption status for every pool
rather than just one, breaking the comparison.

On systems with a zfs root and more than one pool present, this
manifests as an error message on boot just before openrc is invoked:

    sh: enabled: unknown operand

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -282,7 +282,7 @@
 # Do some tasks to make sure mounting the ZFS pool is A-OK
 prepare_zfs_root() {
 	local _root_vol=${KOPT_root#ZFS=}
-	local _root_pool=${_rool_vol%%/*}
+	local _root_pool=${_root_vol%%/*}
 
 	# Force import if this has been imported on a different system previously
 	if [ "$KOPT_zfs_force" = 1 ]; then