Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/sysinst The dhcpcd utilties in pkgsrc require dhcpc...



details:   https://anonhg.NetBSD.org/src/rev/61e96f4a6dfc
branches:  trunk
changeset: 332239:61e96f4a6dfc
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Sep 12 20:20:25 2014 +0000

description:
The dhcpcd utilties in pkgsrc require dhcpcd to be running in master mode.
So set dhcpcd to start like so, but restrict it to the configured interface
still instead of ifconfig_foo=dhcp.

diffstat:

 usr.sbin/sysinst/net.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r cdbc7a18e8e2 -r 61e96f4a6dfc usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c    Fri Sep 12 20:18:42 2014 +0000
+++ b/usr.sbin/sysinst/net.c    Fri Sep 12 20:20:25 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net.c,v 1.4 2014/08/19 13:01:48 martin Exp $   */
+/*     $NetBSD: net.c,v 1.5 2014/09/12 20:20:25 roy Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1104,7 +1104,6 @@
 mnt_net_config(void)
 {
        char ifconfig_fn[STRSIZE];
-       char ifconfig_str[STRSIZE];
        FILE *ifconf = NULL;
 
        if (!network_up)
@@ -1181,11 +1180,12 @@
                if (del_rc_conf("defaultroute") == 0)
                        add_rc_conf("defaultroute=\"%s\"\n", net_defroute);
        } else {
-               if (snprintf(ifconfig_str, sizeof ifconfig_str,
-                   "ifconfig_%s", net_dev) > 0 &&
-                   del_rc_conf(ifconfig_str) == 0) {
-                       add_rc_conf("ifconfig_%s=dhcp\n", net_dev);
-               }
+               /*
+                * Start dhcpcd quietly and in master mode, but restrict
+                * it to our interface
+                */
+               add_rc_conf("dhcpcd=YES\n");
+               add_rc_conf("dhcpcd_flags=\"-qM %s\"\n", net_dev);
         }
 
 #ifdef INET6



Home | Main Index | Thread Index | Old Index