HomeFreeBSD

dracut/zfs-load-key.sh: simplify import loop, quote variable assignments

Description

dracut/zfs-load-key.sh: simplify import loop, quote variable assignments

The loop now has a less confusing condition and properly uses
systemctl(1) is-failed's return code instead of that entire mess

The assignments could turn into "var=val program" if encryptionroot
or keylocation had whitespace in them

As a bonus, this (mostly) silences shellcheck

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11198

Details

Provenance
наб <nabijaczleweli@nabijaczleweli.xyz>Authored on Nov 12 2020, 10:06 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 20 2020, 12:20 AM
Parents
rG85703f616ddb: Reduce confusion in zfs_write
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG2d9f82d89118: dracut/zfs-load-key.sh: simplify import loop, quote variable assignments (authored by наб <nabijaczleweli@nabijaczleweli.xyz>).Nov 20 2020, 12:20 AM