From 33cebcbc71d1bfd577008ec521c349f4ffd51282 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 2 May 1995 01:36:14 +0000 Subject: [PATCH] Use tests/resolve/resolve to get the fully qualified domain name of the local host. Needed for systems where gethostname() doesn't return the FQDN. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5680 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/dejagnu/config/ChangeLog | 7 +++++++ src/tests/dejagnu/config/default.exp | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/tests/dejagnu/config/ChangeLog b/src/tests/dejagnu/config/ChangeLog index c5e92385e..1f20473e9 100644 --- a/src/tests/dejagnu/config/ChangeLog +++ b/src/tests/dejagnu/config/ChangeLog @@ -1,3 +1,10 @@ +Mon May 1 21:32:57 1995 Theodore Y. Ts'o (tytso@dcl) + + * default.exp: (get_hostname): Use tests/resolve/resolve to get + the fully qualified domain name of the local host. + Needed for systems where gethostname() doesn't return the + FQDN. + Thu Apr 27 00:22:30 1995 Ezra Peisach * default.exp: KRB5KDC: add -n to don't fork. Set up krb5.conf diff --git a/src/tests/dejagnu/config/default.exp b/src/tests/dejagnu/config/default.exp index 4d6301f37..8a599523f 100644 --- a/src/tests/dejagnu/config/default.exp +++ b/src/tests/dejagnu/config/default.exp @@ -91,6 +91,10 @@ if ![info exists KINIT] { set KINIT [findfile $objdir/../../clients/kinit/kinit] } +if ![info exists RESOLVE] { + set RESOLVE [findfile $objdir/../resolve/resolve] +} + # We use a couple of variables to hold shell prompts which may be # overridden by the user. @@ -157,6 +161,7 @@ proc check_exit_status { testname } { # of the name). Returns 1 on success, 0 on failure. proc get_hostname { } { + global RESOLVE global hostname global localhostname @@ -164,7 +169,7 @@ proc get_hostname { } { return 1 } - catch "exec hostname >tmpdir/hostname" exec_output + catch "exec $RESOLVE -q >tmpdir/hostname" exec_output if ![string match "" $exec_output] { send_log "$exec_output\n" verbose $exec_output -- 2.26.2