aboutsummaryrefslogtreecommitdiff
path: root/tests/tap/remctl.sh
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
committerRuss Allbery <rra@stanford.edu>2010-08-25 18:01:37 -0700
commite91c0b93355b28617f7c0d756026856762ece242 (patch)
tree35c4fb8ab35ec5b8d140a0b7e869848a1fac39a9 /tests/tap/remctl.sh
parent602ff7584d3668c36b1bf5fd43988e6f45eceb48 (diff)
Imported Upstream version 0.12
Diffstat (limited to 'tests/tap/remctl.sh')
-rw-r--r--tests/tap/remctl.sh18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/tap/remctl.sh b/tests/tap/remctl.sh
index b9667ef..9e01bcf 100644
--- a/tests/tap/remctl.sh
+++ b/tests/tap/remctl.sh
@@ -10,18 +10,12 @@
remctld_start () {
local keytab principal
rm -f "$BUILD/data/remctld.pid"
- keytab=''
- for f in "$BUILD/data/test.keytab" "$SOURCE/data/test.keytab" ; do
- if [ -r "$f" ] ; then
- keytab="$f"
- fi
- done
- principal=''
- for f in "$BUILD/data/test.principal" "$SOURCE/data/test.principal" ; do
- if [ -r "$f" ] ; then
- principal=`cat "$BUILD/data/test.principal"`
- fi
- done
+ keytab=`test_file_path data/test.keytab`
+ principal=`test_file_path data/test.principal`
+ principal=`cat "$principal" 2>/dev/null`
+ if [ -z "$keytab" ] || [ -z "$principal" ] ; then
+ return 1
+ fi
if [ -n "$VALGRIND" ] ; then
( "$VALGRIND" --log-file=valgrind.%p --leak-check=full "$1" -m \
-p 14373 -s "$principal" -P "$BUILD/data/remctld.pid" -f "$2" -d \