From 3a20ac4f9df44801f322fb4bc7291531ad39003d Mon Sep 17 00:00:00 2001 From: obrien Date: Thu, 29 Oct 1998 10:38:57 +0000 Subject: Increase the granularity of the debugging messages. --- usr.sbin/sysinstall/media.c | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'usr.sbin/sysinstall/media.c') diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c index 95a2007..74a4141 100644 --- a/usr.sbin/sysinstall/media.c +++ b/usr.sbin/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.89 1998/10/12 23:45:07 jkh Exp $ + * $Id: media.c,v 1.90 1998/10/29 10:18:49 obrien Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -391,18 +391,23 @@ mediaSetFTP(dialogMenuItem *self) msgDebug("Starting DNS.\n"); kickstart_dns(); if (isDebug()) - msgDebug("Looking up hostname: %s.\n", hostname); - if ((inet_addr(hostname) == INADDR_NONE) && (gethostbyname(hostname) == NULL)) { - msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" - "name server, gateway and network interface are correctly configured?", hostname); - if (networkDev) - networkDev->shutdown(networkDev); - networkDev = NULL; - variable_unset(VAR_FTP_PATH); - return DITEM_FAILURE | what; + msgDebug("Looking up hostname, %s, using inet_addr().\n", hostname); + if (inet_addr(hostname) == INADDR_NONE) { + if (isDebug()) + msgDebug("Looking up hostname, %s, using gethostbyname().\n", + hostname); + if (gethostbyname(hostname) == NULL) { + msgConfirm("Cannot resolve hostname `%s'! Are you sure that" + " your\nname server, gateway and network interface are" + " correctly configured?", hostname); + if (networkDev) + networkDev->shutdown(networkDev); + networkDev = NULL; + variable_unset(VAR_FTP_PATH); + return DITEM_FAILURE | what; + } } - else - msgDebug("Found DNS entry for %s successfully..\n", hostname); + msgDebug("Found DNS entry for %s successfully..\n", hostname); } variable_set2(VAR_FTP_HOST, hostname); variable_set2(VAR_FTP_DIR, dir ? dir : "/"); -- cgit v1.1