Author: fanf
Date: Thu May 14 10:32:35 2015
New Revision: 282886
URL: https://svnweb.freebsd.org/changeset/base/282886

Log:
  whois: check WHOIS_SERVER as well as RA_SERVER environment variables
  
  WHOIS_SERVER is used by Debian's whois client.

Modified:
  head/usr.bin/whois/whois.1
  head/usr.bin/whois/whois.c

Modified: head/usr.bin/whois/whois.1
==============================================================================
--- head/usr.bin/whois/whois.1  Thu May 14 10:32:05 2015        (r282885)
+++ head/usr.bin/whois/whois.1  Thu May 14 10:32:35 2015        (r282886)
@@ -75,8 +75,10 @@ If the query is not a domain name or IP 
 .Nm
 will fall back to
 the host specified in the
+.Ev WHOIS_SERVER
+or
 .Ev RA_SERVER
-environment variable, or if that is not set, it will use
+environment variables, or if those are not set, it will use
 .Pa whois.crsnic.net .
 .Pp
 The options are as follows:
@@ -176,8 +178,15 @@ are treated independently and may be use
 as queries on different whois servers.
 .Sh ENVIRONMENT
 .Bl -tag
+.It Ev WHOIS_SERVER
+The primary default whois server.
+If this is unset,
+.Nm
+uses the
+.Ev RA_SERVER
+environment variable.
 .It Ev RA_SERVER
-The default whois server.
+The secondary default whois server.
 If this is unset,
 .Nm
 will use

Modified: head/usr.bin/whois/whois.c
==============================================================================
--- head/usr.bin/whois/whois.c  Thu May 14 10:32:05 2015        (r282885)
+++ head/usr.bin/whois/whois.c  Thu May 14 10:32:35 2015        (r282886)
@@ -183,7 +183,8 @@ main(int argc, char *argv[])
         * level domain from the query, or fall back to NICHOST.
         */
        if (host == NULL && country == NULL) {
-               if ((host = getenv("RA_SERVER")) == NULL) {
+               if ((host = getenv("WHOIS_SERVER")) == NULL &&
+                   (host = getenv("RA_SERVER")) == NULL) {
                        use_qnichost = 1;
                        host = NICHOST;
                        if (!(flags & WHOIS_QUICK))
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to