summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-06 10:14:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:13 -0500
commita856a88ba452b4951edbdfc696f1738e482860d7 (patch)
tree7cc99d6fcd04f27e792b89768e0f518accdd8f0d
parent4be3f7665c6fe17b782098d74a4b02c4555269b8 (diff)
downloadsamba-a856a88ba452b4951edbdfc696f1738e482860d7.tar.gz
samba-a856a88ba452b4951edbdfc696f1738e482860d7.tar.bz2
samba-a856a88ba452b4951edbdfc696f1738e482860d7.zip
r19119: try to be more portable...
metze (This used to be commit 380e647534730313ee57d1acf2756708b7c9676d)
-rwxr-xr-xsource3/script/tests/gdb_backtrace14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/script/tests/gdb_backtrace b/source3/script/tests/gdb_backtrace
index c8fcad45f7..8a74d1c101 100755
--- a/source3/script/tests/gdb_backtrace
+++ b/source3/script/tests/gdb_backtrace
@@ -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. "
+PID=$1
+if [ x"$PID" = x"" ]; then
+ echo "ERROR: ${BASENAME} needs a PID. "
exit 1
fi
-if [ -z $1 ]; then
- echo "ERROR: ${BASENAME} needs a PID. "
+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
-PID=$1
# 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