]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make unloading the key more robust
authorJean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Thu, 18 Jun 2020 17:15:10 +0000 (19:15 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 19 Jul 2020 17:04:14 +0000 (10:04 -0700)
commitceadc0dbbd5594db153a61c3d82a6d98e1adca7d
tree77b3dab537a0e731cddb2020e81cf8b36ffb708c
parentb717f9b95e6b85ea502318f6350a6b6b6a237ebd
Make unloading the key more robust

The unit was failing instead of stopping if someone manually unloaded
the key before stopping the unit (zfs unload-key is failing on an
unavailable key).
Follow a similar logic than for loading the key, checking for the key
status before unloading it.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Co-authored-by: Didier Roche <didrocks@ubuntu.com>
Signed-off-by: Didier Roche <didrocks@ubuntu.com>
Closes #10477
etc/systemd/system-generators/zfs-mount-generator.in