Add utility function to call 'Exit' when script exits.

This commit is contained in:
Chris Lamb 2008-10-19 15:58:29 +01:00 committed by Daniel Baumann
parent 4f9797c893
commit 4c485f1853
1 changed files with 6 additions and 0 deletions

View File

@ -24,3 +24,9 @@ Exit ()
umount chroot/selinux > /dev/null 2>&1 || true
umount chroot/sys > /dev/null 2>&1 || true
}
Setup_cleanup ()
{
Echo_message "Setting up cleanup function"
trap 'Exit' INT TERM HUP EXIT
}