From 0c85b38216c398e27867666fa11346f1c4e9fe4a Mon Sep 17 00:00:00 2001 From: ume Date: Wed, 25 Jun 2014 15:39:08 +0000 Subject: 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(-) (limited to 'usr.bin/whois') diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c index 99926b8..3f6f93a 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) { -- cgit v1.1