]> granicus.if.org Git - zfs/commit
Allow spaces in pool names for cmdline argument
authorkpande <github@tripleback.net>
Mon, 12 Nov 2018 02:23:11 +0000 (21:23 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 12 Nov 2018 02:23:11 +0000 (18:23 -0800)
commiteb1a0b617448a8cb5d83a0f63102a7b24dc15e70
treea84970cea4e0bbf9210d0e5b66c8ef8f756455ce
parentc8fd652ce7abe85c5238356248d1918ea9ff5ff8
Allow spaces in pool names for cmdline argument

PR #8114 quoted the ${ENCRYPTIONROOT} parameter to ensure we don't
lose spaces when unlocking root filesystem in the off chance that
it has a space in its name.

Unfortunately, dracut and initramfs-tools do not actually get the
quotes from the cmdline. If we use root=ZFS="root pool/filesystem
name" the script still only sees root=ZFS=root and no quotation
marks.

Because + is a reserved character in ZFS, it's used as a
placeholder for spaces in the kernel cmdline.  In this way,
root=ZFS=root+pool/filesystem+name will properly expand by
replacing the character with sed (POSIX compliant method).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: bunder2015 <omfgbunder@gmail.com>
Signed-off-by: Kash Pande <kash@tripleback.net>
Issue #8114
Closes #8117
contrib/dracut/90zfs/parse-zfs.sh.in