From f35f40c51fb3f2364703c9f7a053c9adf56cc9e0 Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Wed, 25 Jun 2014 15:39:08 +0000 Subject: [PATCH] Introduce $RA_SERVER to set default whois server. Requested by: nork Reviewed by: nork MFC after: 1 week --- usr.bin/whois/whois.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 99926b8e111a..3f6f93a8751f 100644 --- a/usr.bin/whois/whois.c +++ b/usr.bin/whois/whois.c @@ -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) {