E2E: Make SIGINT handling more complete
This commit is contained in:
parent
7b3454e51b
commit
e06f9c6acb
|
|
@ -153,12 +153,15 @@ ssh-keygen -f "$DOT_SSH/id_test" -P "" >/dev/null
|
||||||
cat "$DOT_SSH/id_test.pub" > "$DOT_SSH/authorized_keys"
|
cat "$DOT_SSH/id_test.pub" > "$DOT_SSH/authorized_keys"
|
||||||
|
|
||||||
function finish() {
|
function finish() {
|
||||||
if [[ $? -ne 0 ]]; then
|
r=$?
|
||||||
|
trap "" INT EXIT
|
||||||
|
if [[ $r != 0 ]]; then
|
||||||
echo
|
echo
|
||||||
echo "the directory $DIR was not removed as it contains"\
|
echo "the directory $DIR was not removed as it contains"\
|
||||||
"log files useful for debugging"
|
"log files useful for debugging"
|
||||||
fi
|
fi
|
||||||
remove_containers
|
remove_containers
|
||||||
|
exit $r
|
||||||
}
|
}
|
||||||
trap finish INT EXIT
|
trap finish INT EXIT
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue