From 2426eb7b0fd52d3ef7d5f79c3f6284985f49476c Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 26 Sep 1996 15:47:49 +0000 Subject: [PATCH] * qualname.pl.in: Renamed old qualname to here as perl path needs updating. * Makefile.in (GEN_SCRIPTS): Add qualname.pl * start_servers_local, env-setup.sh (QUALNAME): Replace with qualname.pl. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9118 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/testing/scripts/ChangeLog | 10 ++++++++++ src/kadmin/testing/scripts/Makefile.in | 3 ++- src/kadmin/testing/scripts/env-setup.sh | 2 +- src/kadmin/testing/scripts/env-setup.shin | 2 +- .../scripts/{qualname => qualname.pl.in} | 0 src/kadmin/testing/scripts/qualname.plin | 18 ++++++++++++++++++ src/kadmin/testing/scripts/start_servers_local | 2 +- 7 files changed, 33 insertions(+), 4 deletions(-) rename src/kadmin/testing/scripts/{qualname => qualname.pl.in} (100%) create mode 100644 src/kadmin/testing/scripts/qualname.plin diff --git a/src/kadmin/testing/scripts/ChangeLog b/src/kadmin/testing/scripts/ChangeLog index 6a7a09768..df7176939 100644 --- a/src/kadmin/testing/scripts/ChangeLog +++ b/src/kadmin/testing/scripts/ChangeLog @@ -1,3 +1,13 @@ +Thu Sep 26 11:45:56 1996 Ezra Peisach + + * qualname.pl.in: Renamed old qualname to here as perl path needs + updating. + + * Makefile.in (GEN_SCRIPTS): Add qualname.pl + + * start_servers_local, env-setup.sh (QUALNAME): Replace with + qualname.pl. + Tue Sep 24 13:28:54 1996 Barry Jaspan * create Makefile.in and configure.in diff --git a/src/kadmin/testing/scripts/Makefile.in b/src/kadmin/testing/scripts/Makefile.in index 38d82c5ea..ef4531702 100644 --- a/src/kadmin/testing/scripts/Makefile.in +++ b/src/kadmin/testing/scripts/Makefile.in @@ -2,11 +2,12 @@ PERL = /usr/athena/bin/perl GEN_SCRIPTS = compare_dump.pl fixup-conf-files.pl make-host-keytab.pl \ - simple_dump.pl verify_xrunner_report.pl + simple_dump.pl verify_xrunner_report.pl qualname.pl all:: $(GEN_SCRIPTS) restore_files.sh restore_files.sh: + rm -f restore_files.sh ln -s save_files.sh restore_files.sh %.pl: %.pl.in diff --git a/src/kadmin/testing/scripts/env-setup.sh b/src/kadmin/testing/scripts/env-setup.sh index fd5b51ced..dd6837b74 100644 --- a/src/kadmin/testing/scripts/env-setup.sh +++ b/src/kadmin/testing/scripts/env-setup.sh @@ -31,7 +31,7 @@ TCLUTIL=$TESTDIR/tcl/util.t; export TCLUTIL BSDDB_DUMP=$TESTDIR/util/bsddb_dump; export BSDDB_DUMP CLNTTCL=$TESTDIR/util/ovsec_kadm_clnt_tcl; export CLNTTCL SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl; export SRVTCL -QUALNAME=$TOP/inst-scripts/qualname; export QUALNAME +QUALNAME=$TOP/inst-scripts/qualname.pl; export QUALNAME START_SERVERS=$TESTDIR/scripts/start_servers $TEST_SERVER export START_SERVERS diff --git a/src/kadmin/testing/scripts/env-setup.shin b/src/kadmin/testing/scripts/env-setup.shin index fd5b51ced..dd6837b74 100644 --- a/src/kadmin/testing/scripts/env-setup.shin +++ b/src/kadmin/testing/scripts/env-setup.shin @@ -31,7 +31,7 @@ TCLUTIL=$TESTDIR/tcl/util.t; export TCLUTIL BSDDB_DUMP=$TESTDIR/util/bsddb_dump; export BSDDB_DUMP CLNTTCL=$TESTDIR/util/ovsec_kadm_clnt_tcl; export CLNTTCL SRVTCL=$TESTDIR/util/ovsec_kadm_srv_tcl; export SRVTCL -QUALNAME=$TOP/inst-scripts/qualname; export QUALNAME +QUALNAME=$TOP/inst-scripts/qualname.pl; export QUALNAME START_SERVERS=$TESTDIR/scripts/start_servers $TEST_SERVER export START_SERVERS diff --git a/src/kadmin/testing/scripts/qualname b/src/kadmin/testing/scripts/qualname.pl.in similarity index 100% rename from src/kadmin/testing/scripts/qualname rename to src/kadmin/testing/scripts/qualname.pl.in diff --git a/src/kadmin/testing/scripts/qualname.plin b/src/kadmin/testing/scripts/qualname.plin new file mode 100644 index 000000000..3d047c550 --- /dev/null +++ b/src/kadmin/testing/scripts/qualname.plin @@ -0,0 +1,18 @@ +#!/afs/athena/contrib/perl/p + +if ($#ARGV == -1) { + chop($hostname = `hostname`); +} else { + $hostname = $ARGV[0]; +} + +if (! (($type,$addr) = (gethostbyname($hostname))[2,4])) { + print STDERR "No such host: $hostname\n"; + exit(1); +} +if (! ($qualname = (gethostbyaddr($addr,$type))[0])) { + print STDERR "No address information for host $hostname\n"; + exit(1); +} +print "$qualname\n"; + diff --git a/src/kadmin/testing/scripts/start_servers_local b/src/kadmin/testing/scripts/start_servers_local index a9c8e7957..17deebad6 100644 --- a/src/kadmin/testing/scripts/start_servers_local +++ b/src/kadmin/testing/scripts/start_servers_local @@ -93,7 +93,7 @@ fi # allow admin to krlogin as root (for cleanup) DUMMY=${REALM=SECURE-TEST.OV.COM}; export REALM hostname=`hostname` -QUALNAME=`$TOP/testing/scripts/qualname $hostname`; export QUALNAME +QUALNAME=`$TOP/testing/scripts/qualname.pl $hostname`; export QUALNAME eval $SRVTCL <<'EOF' $REDIRECT source $env(TOP)/testing/tcl/util.t -- 2.26.2