diff options
author | Leho Kraav <leho@kraav.com> | 2012-07-24 15:08:54 +0300 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2012-07-25 10:31:43 +0200 |
commit | df68781fca048de2f880be37ab9e1ede9bea5051 (patch) | |
tree | e2bbb14065279711e6eab28549f59945f98bcaf6 /modules.d/91crypt-loop | |
parent | f855f9daafe8f5f53c5bf78188587a18e9aca142 (diff) | |
download | dracut-df68781fca048de2f880be37ab9e1ede9bea5051.tar.gz dracut-df68781fca048de2f880be37ab9e1ede9bea5051.tar.bz2 dracut-df68781fca048de2f880be37ab9e1ede9bea5051.zip |
91crypt-loop: use initqueue for cleanup strategy
Diffstat (limited to 'modules.d/91crypt-loop')
-rw-r--r-- | modules.d/91crypt-loop/crypt-loop-lib.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules.d/91crypt-loop/crypt-loop-lib.sh b/modules.d/91crypt-loop/crypt-loop-lib.sh index 63a553c2..6774e7d8 100644 --- a/modules.d/91crypt-loop/crypt-loop-lib.sh +++ b/modules.d/91crypt-loop/crypt-loop-lib.sh @@ -32,6 +32,11 @@ loop_decrypt() { --tty-echo-off [ -b $key ] || die "Tried setting it up, but keyfile block device was still not found!" + + initqueue --onetime --finished --unique --name "crypt-loop-cleanup-10-$(basename $key)" \ + $(command -v cryptsetup) "luksClose $key" + initqueue --onetime --finished --unique --name "crypt-loop-cleanup-20-$(basename $loopdev)" \ + $(command -v losetup) "-d $loopdev" else info "Existing keyfile found, re-using it for $device" fi |