Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst Don't prompt for hostname or domain if obta...



details:   https://anonhg.NetBSD.org/src/rev/44775324428f
branches:  trunk
changeset: 802388:44775324428f
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Sep 12 21:02:06 2014 +0000

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

diffstat:

 usr.sbin/sysinst/net.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r e1abd94d91d1 -r 44775324428f usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Fri Sep 12 21:00:11 2014 +0000
+++ b/usr.sbin/sysinst/net.c    Fri Sep 12 21:02:06 2014 +0000
@@ -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 @@
                }
        }
 
-       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 */



Home | Main Index | Thread Index | Old Index