Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Is it possible to trap Ctrl-C and run some cleanup code in a shell script? How would I do that? I've got this shell script for setting up a gentoo embedded environment, and it mounts a few directories, then chroots. If it runs successfully, it umounts when done, but if it fails, it doesn't run the umounts. Then I fix whatever bug it was that caused it to fail, and rm -rf that directory to start again from scratch. And that deletes my /usr/portage tree, and I get pissed and waste time. Any ideas?
BLU is a member of BostonUserGroups | |
We also thank MIT for the use of their facilities. |