diff options
author | Simo Sorce <idra@samba.org> | 2005-10-29 13:19:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:15 -0500 |
commit | fa75e8c1d482cdbad2ff074eccb2baf8d5bba856 (patch) | |
tree | 51797882a25cfdd23dc653d80cd5cf1723cc6f42 /packaging/Debian/debian-woody/panic-action | |
parent | 3a5c37bfd12781077fe8e7c6ebb23c2cfdb77fd1 (diff) | |
download | samba-fa75e8c1d482cdbad2ff074eccb2baf8d5bba856.tar.gz samba-fa75e8c1d482cdbad2ff074eccb2baf8d5bba856.tar.bz2 samba-fa75e8c1d482cdbad2ff074eccb2baf8d5bba856.zip |
r11395: Update the Debian packaging.
Move form stable to stable distribution names based hives.
(This used to be commit bb13b3482047b6ab6d84ba9e2839cf8a0fac71aa)
Diffstat (limited to 'packaging/Debian/debian-woody/panic-action')
-rw-r--r-- | packaging/Debian/debian-woody/panic-action | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/packaging/Debian/debian-woody/panic-action b/packaging/Debian/debian-woody/panic-action new file mode 100644 index 0000000000..13f773c1ef --- /dev/null +++ b/packaging/Debian/debian-woody/panic-action @@ -0,0 +1,48 @@ +#!/bin/sh + +# Redirect all output to our mail command +( + # We must be given a pid to look at + if [ -z "$1" ]; then + echo "$0 called with no arguments." + exit 1 + fi + + if [ ! -d "/proc/$1" ]; then + echo "$0: No such process: $1" + exit 1 + fi + + # Find out what binary we're debugging + BINARYNAME=`readlink "/proc/$1/exe"` + + # Generic header for our email + echo "The Samba 'panic action' script, $0," + echo "was called for pid $1 ($BINARYNAME)." + echo + + if [ -z "$BINARYNAME" ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, the executable could not be found for process $1." + echo "It may have died unexpectedly, or you may not have permission to" + echo "debug the process." + exit 1 + fi + + # No debugger + if [ ! -x /usr/bin/gdb ]; then + echo "This means there was a problem with the program, such as a segfault." + echo "However, gdb was not found on your system, so the error could not be" + echo "debugged. Please install the gdb package so that debugging information is" + echo "available the next time such a problem occurs." + exit 1 + fi + + echo "Below is a backtrace for this process generated with gdb, which shows" + echo "the state of the program at the time the error occured. You are" + echo "encouraged to submit this information as a bug report to Debian. For" + echo "information about the procedure for submitting bug reports , please see" + echo "http://www.debian.org/Bugs/Reporting or the reportbug(1) manpage." + echo + gdb -x /etc/samba/gdbcommands -batch "$BINARYNAME" "$1" +) | mail -s "Segfault in Samba" root |