svn commit: r268154 - stable/10/usr.bin/whois

Hajimu UMEMOTO ume at FreeBSD.org
Wed Jul 2 11:49:16 UTC 2014


Author: ume
Date: Wed Jul  2 11:49:15 2014
New Revision: 268154
URL: http://svnweb.freebsd.org/changeset/base/268154

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

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

Modified: stable/10/usr.bin/whois/whois.c
==============================================================================
--- stable/10/usr.bin/whois/whois.c	Wed Jul  2 10:49:06 2014	(r268153)
+++ stable/10/usr.bin/whois/whois.c	Wed Jul  2 11:49:15 2014	(r268154)
@@ -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-stable mailing list