1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r19119: try to be more portable...

metze
This commit is contained in:
Stefan Metzmacher 2006-10-06 10:14:56 +00:00 committed by Gerald (Jerry) Carter
parent 5efd4b04b8
commit 380e647534

View File

@ -7,23 +7,23 @@ exec 1>&2
BASENAME=`basename $0`
test -z ${GDB_BIN} && GDB_BIN=`type -p gdb`
if [ -z "${GDB_BIN}" ]; then
echo "ERROR: ${BASENAME} needs an installed gdb. "
exit 1
fi
if [ -z $1 ]; then
PID=$1
if [ x"$PID" = x"" ]; then
echo "ERROR: ${BASENAME} needs a PID. "
exit 1
fi
PID=$1
test x"${GDB_BIN}" = x"" && GDB_BIN=`type -p gdb`
if [ x"${GDB_BIN}" = x"" ]; then
echo "ERROR: ${BASENAME} needs an installed gdb. "
exit 1
fi
# use /dev/shm as default temp directory
test -d /dev/shm && \
TMP_BASE_DIR=/dev/shm || \
TMP_BASE_DIR=/var/tmp
TMPFILE=$( mktemp -p ${TMP_BASE_DIR} backtrace.XXXXXX)
TMPFILE=`mktemp -p ${TMP_BASE_DIR} backtrace.XXXXXX`
if [ $? -ne 0 ]; then
echo "ERROR: ${basename} can't create temp file in ${TMP_BASE_DIR}. "
exit 1