diff options
| author | Christian Rößler | 2014-04-04 17:24:10 +0200 |
|---|---|---|
| committer | Christian Rößler | 2014-04-04 17:24:10 +0200 |
| commit | a5fe6fe46afd8179110865a3ecf9643c9a3bb88d (patch) | |
| tree | 31cc7e302c08e4a99017bee90e052d644977c5f2 /remote/includes | |
| parent | Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-a5fe6fe46afd8179110865a3ecf9643c9a3bb88d.tar.gz tm-scripts-a5fe6fe46afd8179110865a3ecf9643c9a3bb88d.tar.xz tm-scripts-a5fe6fe46afd8179110865a3ecf9643c9a3bb88d.zip | |
[cleanup.inc] Better trapping - trap me once, don't trap me twice (Please test!)
Diffstat (limited to 'remote/includes')
| -rw-r--r-- | remote/includes/cleanup.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/remote/includes/cleanup.inc b/remote/includes/cleanup.inc index 144d7fd9..1b161444 100644 --- a/remote/includes/cleanup.inc +++ b/remote/includes/cleanup.inc @@ -20,10 +20,13 @@ trap cleanexit SIGINT SIGTERM # main cleaner function cleanexit() { - pinfo "SIGINT/SIGTERM triggered - cleaning up ..." + trap '' SIGINT SIGTERM # from now on, ignore INT and TERM + unset_quiet # needed to get trap functioning correctly + pwarning "SIGINT/SIGTERM triggered - cleaning up ..." # unmount and remove the temporary chroot stuff + pinfo "Calling chroot_cleanup_mounts ..." chroot_cleanup_mounts - # TODO vmware etc/vmware/config stuff here, if it is still needed - + exit 1 # perhaps a better exit code? } + |
