Use tests/resolve/resolve to get the fully qualified domain name of
authorTheodore Tso <tytso@mit.edu>
Tue, 2 May 1995 01:36:14 +0000 (01:36 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 2 May 1995 01:36:14 +0000 (01:36 +0000)
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
src/tests/dejagnu/config/default.exp

index c5e92385e77e591b07359df4f889bdbe9c188b5c..1f20473e9dd7c31a9ccac6ea632f1cd721422a18 100644 (file)
@@ -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  <epeisach@kangaroo.mit.edu>
 
        * default.exp: KRB5KDC: add -n to don't fork. Set up krb5.conf 
index 4d6301f37c31b0d7554fadb93ab78018be8900d4..8a599523feacb7c33e3b548701a8f29962e02a4d 100644 (file)
@@ -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