HomeFreeBSD

systemd: import: expand $ZPOOL_IMPORT_OPTS correctly

Description

systemd: import: expand $ZPOOL_IMPORT_OPTS correctly

Turns out $ZPOOL_IMPORT_OPTS expands in a shell-like fashion,
yielding 'import' '-aN' '-o' 'cachefile=none' for an unset variable,
and 'import' '-aN' '-o' 'cachefile=none' 'word1' 'word2' for a
white-spaced one, but ${ZPOOL_IMPORT_OPTS} expands like "${Z_I_O}"
would in a shell, yielding 'import' '-aN' '-o' 'cachefile=none' ''
(empty) and 'import' '-aN' '-o' 'cachefile=none' 'word1 word2' (spaced)

Fixes eec5ba113e1d285d445333079a3e8184872ad00a "dracut: 90zfs: respect
zfs_force=1 on systemd systems"

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes: #12231

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on Jun 14 2021, 3:48 PM
GitHub <noreply@github.com>Committed on Jun 14 2021, 3:48 PM
Parents
rG069bf406b461: vdev_draid_min_asize() ignores reserved space
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG83ba91adf6c0: systemd: import: expand $ZPOOL_IMPORT_OPTS correctly (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).Jun 14 2021, 3:48 PM