Module Name:    src
Committed By:   roy
Date:           Fri Sep 12 21:02:06 UTC 2014

Modified Files:
        src/usr.sbin/sysinst: net.c

Log Message:
Don't prompt for hostname or domain if obtained from DHCP.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/net.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/sysinst/net.c
diff -u src/usr.sbin/sysinst/net.c:1.7 src/usr.sbin/sysinst/net.c:1.8
--- src/usr.sbin/sysinst/net.c:1.7	Fri Sep 12 20:48:55 2014
+++ src/usr.sbin/sysinst/net.c	Fri Sep 12 21:02:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: net.c,v 1.7 2014/09/12 20:48:55 roy Exp $	*/
+/*	$NetBSD: net.c,v 1.8 2014/09/12 21:02:06 roy Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -716,9 +716,13 @@ again:
 		}
 	}
 
-	msg_prompt_add(MSG_net_domain, net_domain, net_domain,
-	    sizeof net_domain);
-	msg_prompt_add(MSG_net_host, net_host, net_host, sizeof net_host);
+	if (!(net_dhcpconf & DHCPCONF_HOST))
+		msg_prompt_add(MSG_net_host, net_host, net_host,
+		    sizeof net_host);
+
+	if (!(net_dhcpconf & DHCPCONF_DOMAIN))
+		msg_prompt_add(MSG_net_domain, net_domain, net_domain,
+		    sizeof net_domain);
 
 	if (!dhcp_config) {
 		/* Manually configure IPv4 */

Reply via email to