diff options
author | ume <ume@FreeBSD.org> | 2014-06-25 15:39:08 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2014-06-25 15:39:08 +0000 |
commit | 0c85b38216c398e27867666fa11346f1c4e9fe4a (patch) | |
tree | e1aa65169771575f6b942d6e74686bffa7517933 /usr.bin/whois | |
parent | 6ad20b92fb390f7f40e61e03f3c9c814885c87f5 (diff) | |
download | FreeBSD-src-0c85b38216c398e27867666fa11346f1c4e9fe4a.zip FreeBSD-src-0c85b38216c398e27867666fa11346f1c4e9fe4a.tar.gz |
Introduce $RA_SERVER to set default whois server.
Requested by: nork
Reviewed by: nork
MFC after: 1 week
Diffstat (limited to 'usr.bin/whois')
-rw-r--r-- | usr.bin/whois/whois.c | 10 |
1 files changed, 6 insertions, 4 deletions
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) { |