]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
systemd: import: expand $ZPOOL_IMPORT_OPTS correctly
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 14 Jun 2021 15:48:53 +0000 (17:48 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Jun 2021 23:56:53 +0000 (16:56 -0700)
commitff64096e756680068fc38da0d66038df8b2d2838
treed9ff2f5a0be68b12b270af6718c2663be8efb934
parent7e2212990b99402375fae2656517d6aa63a98f6c
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
etc/systemd/system/zfs-import-cache.service.in
etc/systemd/system/zfs-import-scan.service.in