projects
/
grml-debootstrap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Install signal handler to always cleanup chroot.
[grml-debootstrap.git]
/
chroot-script
diff --git
a/chroot-script
b/chroot-script
index
f056f61
..
d0f71f3
100755
(executable)
--- a/
chroot-script
+++ b/
chroot-script
@@
-417,6
+417,18
@@
finalize() {
}
# }}}
}
# }}}
+# signal handler {{{
+signal_handler() {
+ finalize
+ [ -n "$1" ] && EXIT="$1" || EXIT="1"
+ exit "$EXIT"
+}
+# }}}
+
+# set signal handler {{{
+trap signal_handler HUP INT QUIT TERM
+# }}}
+
# execute the functions {{{
# always execute install_policy_rcd
# execute the functions {{{
# always execute install_policy_rcd