HomeFreeBSD

Allow spaces in pool names for cmdline argument

Description

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

Details

Provenance
kpande <github@tripleback.net>Authored on Nov 12 2018, 2:23 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 12 2018, 2:23 AM
Parents
rGc8fd652ce7ab: Fix coverity defects: CID 184285
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGeb1a0b617448: Allow spaces in pool names for cmdline argument (authored by kpande <github@tripleback.net>).Nov 12 2018, 2:23 AM