diff options
author | obrien <obrien@FreeBSD.org> | 1998-10-29 10:38:57 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1998-10-29 10:38:57 +0000 |
commit | 3a20ac4f9df44801f322fb4bc7291531ad39003d (patch) | |
tree | 076e8dcf42a39a7bb00962a7c154dbc84b7f8708 /usr.sbin | |
parent | 7b016aff6e4b71e745b0caa5533389c836e5f642 (diff) | |
download | FreeBSD-src-3a20ac4f9df44801f322fb4bc7291531ad39003d.zip FreeBSD-src-3a20ac4f9df44801f322fb4bc7291531ad39003d.tar.gz |
Increase the granularity of the debugging messages.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sysinstall/media.c | 29 |
1 files changed, 17 insertions, 12 deletions
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 : "/"); |