diff options
author | jkh <jkh@FreeBSD.org> | 1996-08-01 12:59:54 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-08-01 12:59:54 +0000 |
commit | 6b1c559b52e523520a110e418b96fa9cd0402be5 (patch) | |
tree | 18ddb8b3c42d13de79ab9dfd694275609c258099 /release | |
parent | 0d5105c09c0929b4f4c2523bcf8efedccf48683b (diff) | |
download | FreeBSD-src-6b1c559b52e523520a110e418b96fa9cd0402be5.zip FreeBSD-src-6b1c559b52e523520a110e418b96fa9cd0402be5.tar.gz |
Don't query DNS if we haven't got it configured.
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/media.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c index 570802b..dcd606a 100644 --- a/release/sysinstall/media.c +++ b/release/sysinstall/media.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: media.c,v 1.49 1996/07/08 12:00:40 jkh Exp $ + * $Id: media.c,v 1.50 1996/08/01 12:02:26 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -309,12 +309,14 @@ mediaSetFTP(dialogMenuItem *self) msgDebug("dir = `%s'\n", dir ? dir : "/"); msgDebug("port # = `%d'\n", FtpPort); } - msgNotify("Looking up host %s..", hostname); - if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) { - msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" - "name server, gateway and network interface are correctly configured?", hostname); - mediaDevice->shutdown(mediaDevice); - return DITEM_FAILURE | DITEM_RECREATE; + if (variable_get(VAR_NAMESERVER)) { + msgNotify("Looking up host %s..", hostname); + if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) { + msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" + "name server, gateway and network interface are correctly configured?", hostname); + mediaDevice->shutdown(mediaDevice); + return DITEM_FAILURE | DITEM_RECREATE; + } } variable_set2(VAR_FTP_HOST, hostname); variable_set2(VAR_FTP_DIR, dir ? dir : "/"); @@ -390,11 +392,13 @@ mediaSetNFS(dialogMenuItem *self) return DITEM_FAILURE; } *idx = '\0'; - msgNotify("Looking up host %s..", cp); - if ((gethostbyname(cp) == NULL) && (inet_addr(cp) == INADDR_NONE)) { - msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" - "name server, gateway and network interface are correctly configured?", cp); - return DITEM_FAILURE; + if (variable_get(VAR_NAMESERVER)) { + msgNotify("Looking up host %s..", cp); + if ((gethostbyname(cp) == NULL) && (inet_addr(cp) == INADDR_NONE)) { + msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" + "name server, gateway and network interface are correctly configured?", cp); + return DITEM_FAILURE; + } } variable_set2(VAR_NFS_HOST, cp); nfsDevice.type = DEVICE_TYPE_NFS; |