diff options
author | Chris Lamb <lamby@debian.org> | 2008-10-19 15:58:29 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:43 +0100 |
commit | 4c485f18532068ba271ef4fa1a84bb465f1d9a29 (patch) | |
tree | 76a2bd0890bfbb4d20b966a106544cd4b9acfe45 /functions/exit.sh | |
parent | 4f9797c893286c3c4de99bdb906e69a615d7467e (diff) | |
download | vyos-live-build-4c485f18532068ba271ef4fa1a84bb465f1d9a29.tar.gz vyos-live-build-4c485f18532068ba271ef4fa1a84bb465f1d9a29.zip |
Add utility function to call 'Exit' when script exits.
Diffstat (limited to 'functions/exit.sh')
-rwxr-xr-x | functions/exit.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/functions/exit.sh b/functions/exit.sh index 1c2446204..47b88a775 100755 --- a/functions/exit.sh +++ b/functions/exit.sh @@ -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 +} |