summaryrefslogtreecommitdiffstats
path: root/src/kadmin/testing/scripts/qualname.plin
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>1996-09-26 15:47:49 +0000
committerEzra Peisach <epeisach@mit.edu>1996-09-26 15:47:49 +0000
commit2426eb7b0fd52d3ef7d5f79c3f6284985f49476c (patch)
treee76122e3692ce356a498b264999e8e01ed9e580e /src/kadmin/testing/scripts/qualname.plin
parent81104f5ff80ff8dbb7d1a06f2045c44b097c5e48 (diff)
downloadkrb5-2426eb7b0fd52d3ef7d5f79c3f6284985f49476c.tar.gz
krb5-2426eb7b0fd52d3ef7d5f79c3f6284985f49476c.tar.xz
krb5-2426eb7b0fd52d3ef7d5f79c3f6284985f49476c.zip
* 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
Diffstat (limited to 'src/kadmin/testing/scripts/qualname.plin')
-rw-r--r--src/kadmin/testing/scripts/qualname.plin18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/kadmin/testing/scripts/qualname.plin b/src/kadmin/testing/scripts/qualname.plin
new file mode 100644
index 0000000000..3d047c550a
--- /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";
+