File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 8484 default = {
8585 dev = ''
8686 ${ lib . optionalString ( config . options . keylocation or "none" != "none" ) ''
87- if [ "$(zfs get keystatus ${ config . name } -H -o value)" == "unavailable" ]; then
88- zfs load-key ${ config . name }
87+ if [ "$(zfs get keystatus ${ config . _name } -H -o value)" == "unavailable" ]; then
88+ zfs load-key ${ config . _name }
8989 fi
9090 '' }
9191
9898 inherit config options ;
9999 default = {
100100 dev = ''
101- ${ lib . optionalString (
102- config . options . keylocation or "none" != "none"
103- ) "zfs unload-key ${ config . name } " }
101+ ${ lib . optionalString ( config . options . keylocation or "none" != "none" ) ''
102+ if [ "$(zfs get keystatus ${ config . _name } -H -o value)" == "available" ]; then
103+ zfs unload-key ${ config . _name }
104+ fi
105+ '' }
104106
105107 ${ config . content . _unmount . dev or "" }
106108 '' ;
You can’t perform that action at this time.
0 commit comments