]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdcheck: improve cleanup
authorNeilBrown <neilb@suse.com>
Fri, 6 Oct 2017 01:34:40 +0000 (12:34 +1100)
committerJes Sorensen <jsorensen@fb.com>
Tue, 10 Oct 2017 20:42:39 +0000 (16:42 -0400)
We should remove the tmp file on signals as well as on exit.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
misc/mdcheck

index 589d038eed9b575d7c7fd1c2ec5d3edbcd69e5f5..42d4094a27543830658b49b5536bfe9e5f114d3b 100644 (file)
@@ -66,7 +66,7 @@ shift
 
 # We need a temp file occasionally...
 tmp=/var/lib/mdcheck/.md-check-$$
-trap 'rm -f "$tmp"' 0
+trap 'rm -f "$tmp"' 0 2 3 15
 
 
 # firstly, clean out really old state files