summaryrefslogtreecommitdiffstats
path: root/usr.bin/whois/whois.c
diff options
context:
space:
mode:
authorfanf <fanf@FreeBSD.org>2015-05-14 10:32:35 +0000
committerfanf <fanf@FreeBSD.org>2015-05-14 10:32:35 +0000
commitda775e97f71f7b00d56f4713fd4176a72bb87b4b (patch)
treea033c84308967cfe9b7895d4b8689f4f06f711ad /usr.bin/whois/whois.c
parent426168849a59b56fcb5381c9eeec45bd8ba4b54e (diff)
downloadFreeBSD-src-da775e97f71f7b00d56f4713fd4176a72bb87b4b.zip
FreeBSD-src-da775e97f71f7b00d56f4713fd4176a72bb87b4b.tar.gz
whois: check WHOIS_SERVER as well as RA_SERVER environment variables
WHOIS_SERVER is used by Debian's whois client.
Diffstat (limited to 'usr.bin/whois/whois.c')
-rw-r--r--usr.bin/whois/whois.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/whois/whois.c b/usr.bin/whois/whois.c
index 3ee2c74..9fe979c 100644
--- a/usr.bin/whois/whois.c
+++ b/usr.bin/whois/whois.c
@@ -183,7 +183,8 @@ main(int argc, char *argv[])
* level domain from the query, or fall back to NICHOST.
*/
if (host == NULL && country == NULL) {
- if ((host = getenv("RA_SERVER")) == NULL) {
+ if ((host = getenv("WHOIS_SERVER")) == NULL &&
+ (host = getenv("RA_SERVER")) == NULL) {
use_qnichost = 1;
host = NICHOST;
if (!(flags & WHOIS_QUICK))
OpenPOWER on IntegriCloud