From db6808a25b1ccfcaa936811008c3e6a5bd75cc32 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Tue, 3 Dec 2002 11:18:15 -0500 Subject: [svn-r6146] Description: added a command so that snapshot prints a message before exiting. Platforms tested: eirene --- bin/snapshot | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/snapshot b/bin/snapshot index 8c246cb..731aa2b 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -25,6 +25,11 @@ TIMESTAMP() echo "=====" "$1": "`date`" "=====" } +EXIT_BANNER() +{ +TIMESTAMP "Exit $0 with status=$?" +} + # MAIN echo "=====================================" echo "$0 $*" @@ -32,6 +37,9 @@ echo "=====================================" TIMESTAMP MAIN uname -a +# setup exit banner message +trap EXIT_BANNER 0 + # The path isn't properly initialized on hawkwind -- /usr/local/bin is # either missing or is after /usr/bin when it should be before. PATH="/usr/local/bin:$PATH" -- cgit v0.12