svn commit: r268155 - stable/9/usr.bin/whois

Hajimu UMEMOTO ume at FreeBSD.org
Wed Jul 2 11:51:02 UTC 2014


Author: ume
Date: Wed Jul  2 11:51:01 2014
New Revision: 268155
URL: http://svnweb.freebsd.org/changeset/base/268155

Log:
  MFC r267871: Introduce $RA_SERVER to set default whois server.
  
  Requested by:	nork
  Reviewed by:	nork

Modified:
  stable/9/usr.bin/whois/whois.c
Directory Properties:
  stable/9/usr.bin/whois/   (props changed)

Modified: stable/9/usr.bin/whois/whois.c
==============================================================================
--- stable/9/usr.bin/whois/whois.c	Wed Jul  2 11:49:15 2014	(r268154)
+++ stable/9/usr.bin/whois/whois.c	Wed Jul  2 11:51:01 2014	(r268155)
@@ -179,10 +179,12 @@ main(int argc, char *argv[])
 	 * back to NICHOST.
 	 */
 	if (host == NULL && country == NULL) {
-		use_qnichost = 1;
-		host = NICHOST;
-		if (!(flags & WHOIS_QUICK))
-			flags |= WHOIS_RECURSE;
+		if ((host = getenv("RA_SERVER")) == NULL) {
+			use_qnichost = 1;
+			host = NICHOST;
+			if (!(flags & WHOIS_QUICK))
+				flags |= WHOIS_RECURSE;
+		}
 	}
 	while (argc-- > 0) {
 		if (country != NULL) {


More information about the svn-src-all mailing list