Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst sysinst: Prompt for hostname and domain, ev...



details:   https://anonhg.NetBSD.org/src/rev/709a1d749a88
branches:  trunk
changeset: 366136:709a1d749a88
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sun May 15 17:02:37 2022 +0000

description:
sysinst: Prompt for hostname and domain, even when using DHCP.

Values discovered from the network may not match desired values for the
target system. Always give an opportunity to override them when using
DHCP.

diffstat:

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

diffs (32 lines):

diff -r 52be181ff268 -r 709a1d749a88 usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Sun May 15 16:58:28 2022 +0000
+++ b/usr.sbin/sysinst/net.c    Sun May 15 17:02:37 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.40 2022/01/13 14:47:11 nia Exp $     */
+/*     $NetBSD: net.c,v 1.41 2022/05/15 17:02:37 jmcneill Exp $        */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -652,13 +652,15 @@
                }
        }
 
-       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);
+       /*
+        * Prompt for hostname and domain, even when using DHCP. The names
+        * discovered on the network may not match the desired values
+        * for the target system.
+        */ 
+       msg_prompt_add(MSG_net_host, net_host, net_host,
+           sizeof net_host);
+       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